File tree Expand file tree Collapse file tree 5 files changed +14
-7
lines changed
Expand file tree Collapse file tree 5 files changed +14
-7
lines changed Original file line number Diff line number Diff line change @@ -39,6 +39,8 @@ def __call__(self, request):
3939 or pathActual .endswith ('/webhook' ) or pathActual .startswith ('/cloudAPI' ) or pathActual .endswith ('/gitNotify' ):
4040 pass
4141 else :
42+ if os .path .exists (ProcessUtilities .debugPath ):
43+ logging .writeToFile (f'Request needs session : { pathActual } ' )
4244 try :
4345 val = request .session ['userID' ]
4446 except :
@@ -95,6 +97,9 @@ def __call__(self, request):
9597 if bool (request .body ):
9698 try :
9799
100+ if os .path .exists (ProcessUtilities .debugPath ):
101+ logging .writeToFile ('Request body detected.. scanning' )
102+
98103 # logging.writeToFile(request.body)
99104 data = json .loads (request .body )
100105 for key , value in data .items ():
Original file line number Diff line number Diff line change @@ -48,7 +48,6 @@ def verifyConn(request):
4848 data_ret = {"verifyConn" : 0 }
4949 json_data = json .dumps (data_ret )
5050 return HttpResponse (json_data )
51-
5251 except BaseException as msg :
5352 data_ret = {'verifyConn' : 0 , 'error_message' : str (msg )}
5453 json_data = json .dumps (data_ret )
Original file line number Diff line number Diff line change 1111from loginSystem .views import loadLoginPage
1212import os
1313from plogical .CyberCPLogFileWriter import CyberCPLogFileWriter as logging
14- from django .shortcuts import HttpResponse
1514from django .views .decorators .csrf import csrf_exempt
1615
1716def loadBackupHome (request ):
Original file line number Diff line number Diff line change @@ -24,10 +24,13 @@ def router(request):
2424 if admin .api == 0 :
2525 return cm .ajaxPre (0 , 'API Access Disabled.' )
2626
27- if cm .verifyLogin (request )[0 ] == 1 :
28- pass
29- else :
30- return cm .verifyLogin (request )[1 ]
27+ try :
28+ if cm .verifyLogin (request )[0 ] == 1 :
29+ pass
30+ else :
31+ return cm .verifyLogin (request )[1 ]
32+ except BaseException as msg :
33+ return cm .ajaxPre (0 , f"Something went wrong during token processing. ErrorL { str (msg )} " )
3134
3235
3336 ## Debug Log
Original file line number Diff line number Diff line change @@ -560,7 +560,8 @@ def fetchEmails(self):
560560
561561 if os .path .exists (postfixMapPath ):
562562
563- postfixMapData = open (postfixMapPath , 'r' ).read ()
563+ postfixMapData = open (postfixMapPath , 'r' , encoding = 'utf-8' ).read ()
564+
564565
565566 if postfixMapData .find (selectedDomain ) == - 1 :
566567 mailConfigured = 0
You can’t perform that action at this time.
0 commit comments