Skip to content

Commit bf42a54

Browse files
committed
security fix: CP-21: Websites – Create Website
1 parent c5ec9cc commit bf42a54

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

CyberCP/secMiddleware.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ def __call__(self, request):
8080
or key == 'modSecRules' or key == 'recordContentTXT' or key == 'SecAuditLogRelevantStatus' \
8181
or key == 'fileContent' or key == 'commands' or key == 'gitHost' or key == 'ipv6' or key == 'contentNow':
8282
continue
83-
if value.find(';') > -1 or value.find('&&') > -1 or value.find('|') > -1 or value.find('...') > -1 \
83+
if value.find('- -') > -1 or value.find('\n') > -1 or value.find(';') > -1 or value.find('&&') > -1 or value.find('|') > -1 or value.find('...') > -1 \
8484
or value.find("`") > -1 or value.find("$") > -1 or value.find("(") > -1 or value.find(")") > -1 \
8585
or value.find("'") > -1 or value.find("[") > -1 or value.find("]") > -1 or value.find("{") > -1 or value.find("}") > -1\
8686
or value.find(":") > -1 or value.find("<") > -1 or value.find(">") > -1:

websiteFunctions/website.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1813,7 +1813,7 @@ def installWordpressStatus(self, userID=None, data=None):
18131813
statusFile = data['statusFile']
18141814

18151815
if (statusFile[:16] == "/home/cyberpanel" or statusFile[:4] == '/tmp' or statusFile[:18] == '/usr/local/CyberCP') \
1816-
and statusFile != '/usr/local/CyberCP/CyberCP/settings.py' and statusFile.find('..') == -1:
1816+
and statusFile != '/usr/local/CyberCP/CyberCP/settings.py' and statusFile.find('..') == -1 and statusFile != '/home/cyberpanel/.my.cnf':
18171817
pass
18181818
else:
18191819
data_ret = {'abort': 1, 'installStatus': 0, 'installationProgress': "100",

0 commit comments

Comments
 (0)