bug fix to filemanager

This commit is contained in:
usmannasir
2019-04-28 22:01:36 +05:00
parent d8d9f20da3
commit 859b9ca9cd
2 changed files with 6 additions and 0 deletions

View File

@@ -19,6 +19,9 @@ class secMiddleware:
pass
else:
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':
continue
if value.find(';') > -1 or value.find('&&') > -1 or value.find('|') > -1 or value.find('...') > -1:

View File

@@ -6,6 +6,7 @@ from plogical.processUtilities import ProcessUtilities
from websiteFunctions.models import Websites
from random import randint
from django.core.files.storage import FileSystemStorage
import HTMLParser
class FileManager:
def __init__(self, request, data):
@@ -19,6 +20,8 @@ class FileManager:
return HttpResponse(final_json)
def returnPathEnclosed(self, path):
htmlParser = HTMLParser.HTMLParser()
path = htmlParser.unescape(path)
return "'" + path + "'"
def changeOwner(self, path):