mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-08 14:26:16 +01:00
bug fix to filemanager
This commit is contained in:
@@ -19,6 +19,9 @@ class secMiddleware:
|
|||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
if request.build_absolute_uri().find('filemanager') > -1:
|
||||||
|
continue
|
||||||
if key == 'emailMessage' or key == 'configData' or key == 'rewriteRules' or key == 'modSecRules' or key == 'recordContentTXT' or key == 'SecAuditLogRelevantStatus' or key == 'fileContent':
|
if key == 'emailMessage' or key == 'configData' or key == 'rewriteRules' or key == 'modSecRules' or key == 'recordContentTXT' or key == 'SecAuditLogRelevantStatus' or key == 'fileContent':
|
||||||
continue
|
continue
|
||||||
if value.find(';') > -1 or value.find('&&') > -1 or value.find('|') > -1 or value.find('...') > -1:
|
if value.find(';') > -1 or value.find('&&') > -1 or value.find('|') > -1 or value.find('...') > -1:
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ from plogical.processUtilities import ProcessUtilities
|
|||||||
from websiteFunctions.models import Websites
|
from websiteFunctions.models import Websites
|
||||||
from random import randint
|
from random import randint
|
||||||
from django.core.files.storage import FileSystemStorage
|
from django.core.files.storage import FileSystemStorage
|
||||||
|
import HTMLParser
|
||||||
|
|
||||||
class FileManager:
|
class FileManager:
|
||||||
def __init__(self, request, data):
|
def __init__(self, request, data):
|
||||||
@@ -19,6 +20,8 @@ class FileManager:
|
|||||||
return HttpResponse(final_json)
|
return HttpResponse(final_json)
|
||||||
|
|
||||||
def returnPathEnclosed(self, path):
|
def returnPathEnclosed(self, path):
|
||||||
|
htmlParser = HTMLParser.HTMLParser()
|
||||||
|
path = htmlParser.unescape(path)
|
||||||
return "'" + path + "'"
|
return "'" + path + "'"
|
||||||
|
|
||||||
def changeOwner(self, path):
|
def changeOwner(self, path):
|
||||||
|
|||||||
Reference in New Issue
Block a user