Skip to content

Commit 2041dea

Browse files
committed
bug fix: phpmyadmin
1 parent ba0831f commit 2041dea

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

CyberCP/secMiddleware.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,14 @@ def __call__(self, request):
9999

100100
if os.path.exists(ProcessUtilities.debugPath):
101101
logging.writeToFile('Request body detected.. scanning')
102+
logging.writeToFile(str(request.body))
102103

103104
# logging.writeToFile(request.body)
104-
data = json.loads(request.body)
105+
try:
106+
data = json.loads(request.body)
107+
except:
108+
data = request.POST
109+
105110
for key, value in data.items():
106111
if request.path.find('gitNotify') > -1:
107112
break
@@ -207,4 +212,6 @@ def __call__(self, request):
207212
response['X-Content-Type-Options'] = "nosniff"
208213
response['Referrer-Policy'] = "same-origin"
209214

215+
216+
210217
return response

0 commit comments

Comments
 (0)