mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-07 13:56:01 +01:00
bug fix: email list function
This commit is contained in:
@@ -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():
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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):
|
||||
|
||||
@@ -24,10 +24,13 @@ def router(request):
|
||||
if admin.api == 0:
|
||||
return cm.ajaxPre(0, 'API Access Disabled.')
|
||||
|
||||
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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user