diff --git a/CyberCP/secMiddleware.py b/CyberCP/secMiddleware.py index 10f5c160b..e29865d04 100755 --- a/CyberCP/secMiddleware.py +++ b/CyberCP/secMiddleware.py @@ -99,9 +99,14 @@ def __call__(self, request): if os.path.exists(ProcessUtilities.debugPath): logging.writeToFile('Request body detected.. scanning') + logging.writeToFile(str(request.body)) # logging.writeToFile(request.body) - data = json.loads(request.body) + try: + data = json.loads(request.body) + except: + data = request.POST + for key, value in data.items(): if request.path.find('gitNotify') > -1: break @@ -207,4 +212,6 @@ def __call__(self, request): response['X-Content-Type-Options'] = "nosniff" response['Referrer-Policy'] = "same-origin" + + return response