Bug fixes.

This commit is contained in:
usmannasir
2018-07-05 15:22:48 +05:00
parent 27c31b522d
commit e952a6dc5d
30 changed files with 236 additions and 279 deletions

View File

@@ -1,5 +1,6 @@
from django.conf import settings
from django.shortcuts import HttpResponse
from plogical.CyberCPLogFileWriter import CyberCPLogFileWriter as logging
class secMiddleware:
@@ -9,6 +10,6 @@ class secMiddleware:
def __call__(self, request):
if request.method == 'POST':
if request.body.find(';') > -1 or request.body.find('&&') > -1 or request.body.find('|') > -1 or request.body.find('...') > -1:
return HttpResponse('Bad input.')
logging.writeToFile('Bad Input on.')
response = self.get_response(request)
return response

View File

@@ -24,7 +24,7 @@ BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
SECRET_KEY = 'xr%j*p!*$0d%(-(e%@-*hyoz4$f%y77coq0u)6pwmjg4)q&19f'
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
DEBUG = False
ALLOWED_HOSTS = ['*']