fix bug where transveral would be true every delete file due to typo

This commit is contained in:
Andrew 2022-01-14 16:06:02 -05:00
parent c736c2eec1
commit 2689a579a7
3 changed files with 5 additions and 2 deletions

View File

@ -14,6 +14,7 @@ import zlib
import html
import apscheduler
from apscheduler.schedulers.background import BackgroundScheduler
#TZLocal is set as a hidden import on win pipeline
from tzlocal import get_localzone

View File

@ -371,7 +371,7 @@ class AjaxHandler(BaseHandler):
return
# Delete the file
if helper.validate_traversal(helper.get_os_understandable_path(server_info['path']), file_path):
if helper.validate_traversal(helper.get_os_understandable_path(server_info['backup_path']), file_path):
os.remove(file_path)
elif page == "del_dir":

View File

@ -12,6 +12,8 @@ import shutil
import tempfile
import threading
from cron_validator import CronValidator
#TZLocal is set as a hidden import on win pipeline
from tzlocal import get_localzone
from tornado import locale
from tornado import iostream
@ -81,7 +83,7 @@ class PanelHandler(BaseHandler):
page_data = {
# todo: make this actually pull and compare version data
'update_available': False,
'serverTZ': time.tzname,
'serverTZ':get_localzone(),
'version_data': helper.get_version_string(),
'user_data': exec_user_data,
'user_role' : exec_user_role,