bug fix: email list function

This commit is contained in:
usmannasir
2024-11-01 14:46:53 +04:00
parent 9fbdc60978
commit d83c5a998d
5 changed files with 14 additions and 7 deletions

View File

@@ -39,6 +39,8 @@ class secMiddleware:
or pathActual.endswith('/webhook') or pathActual.startswith('/cloudAPI') or pathActual.endswith('/gitNotify'):
pass
else:
if os.path.exists(ProcessUtilities.debugPath):
logging.writeToFile(f'Request needs session : {pathActual}')
try:
val = request.session['userID']
except:
@@ -95,6 +97,9 @@ class secMiddleware:
if bool(request.body):
try:
if os.path.exists(ProcessUtilities.debugPath):
logging.writeToFile('Request body detected.. scanning')
# logging.writeToFile(request.body)
data = json.loads(request.body)
for key, value in data.items():

View File

@@ -48,7 +48,6 @@ def verifyConn(request):
data_ret = {"verifyConn": 0}
json_data = json.dumps(data_ret)
return HttpResponse(json_data)
except BaseException as msg:
data_ret = {'verifyConn': 0, 'error_message': str(msg)}
json_data = json.dumps(data_ret)

View File

@@ -11,7 +11,6 @@ from backup.pluginManager import pluginManager
from loginSystem.views import loadLoginPage
import os
from plogical.CyberCPLogFileWriter import CyberCPLogFileWriter as logging
from django.shortcuts import HttpResponse
from django.views.decorators.csrf import csrf_exempt
def loadBackupHome(request):

View File

@@ -24,10 +24,13 @@ def router(request):
if admin.api == 0:
return cm.ajaxPre(0, 'API Access Disabled.')
if cm.verifyLogin(request)[0] == 1:
pass
else:
return cm.verifyLogin(request)[1]
try:
if cm.verifyLogin(request)[0] == 1:
pass
else:
return cm.verifyLogin(request)[1]
except BaseException as msg:
return cm.ajaxPre(0, f"Something went wrong during token processing. ErrorL {str(msg)}")
## Debug Log

View File

@@ -560,7 +560,8 @@ class MailServerManager(multi.Thread):
if os.path.exists(postfixMapPath):
postfixMapData = open(postfixMapPath, 'r').read()
postfixMapData = open(postfixMapPath, 'r', encoding='utf-8').read()
if postfixMapData.find(selectedDomain) == -1:
mailConfigured = 0