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'):
|
or pathActual.endswith('/webhook') or pathActual.startswith('/cloudAPI') or pathActual.endswith('/gitNotify'):
|
||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
|
if os.path.exists(ProcessUtilities.debugPath):
|
||||||
|
logging.writeToFile(f'Request needs session : {pathActual}')
|
||||||
try:
|
try:
|
||||||
val = request.session['userID']
|
val = request.session['userID']
|
||||||
except:
|
except:
|
||||||
@@ -95,6 +97,9 @@ class secMiddleware:
|
|||||||
if bool(request.body):
|
if bool(request.body):
|
||||||
try:
|
try:
|
||||||
|
|
||||||
|
if os.path.exists(ProcessUtilities.debugPath):
|
||||||
|
logging.writeToFile('Request body detected.. scanning')
|
||||||
|
|
||||||
# logging.writeToFile(request.body)
|
# logging.writeToFile(request.body)
|
||||||
data = json.loads(request.body)
|
data = json.loads(request.body)
|
||||||
for key, value in data.items():
|
for key, value in data.items():
|
||||||
|
|||||||
@@ -48,7 +48,6 @@ def verifyConn(request):
|
|||||||
data_ret = {"verifyConn": 0}
|
data_ret = {"verifyConn": 0}
|
||||||
json_data = json.dumps(data_ret)
|
json_data = json.dumps(data_ret)
|
||||||
return HttpResponse(json_data)
|
return HttpResponse(json_data)
|
||||||
|
|
||||||
except BaseException as msg:
|
except BaseException as msg:
|
||||||
data_ret = {'verifyConn': 0, 'error_message': str(msg)}
|
data_ret = {'verifyConn': 0, 'error_message': str(msg)}
|
||||||
json_data = json.dumps(data_ret)
|
json_data = json.dumps(data_ret)
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ from backup.pluginManager import pluginManager
|
|||||||
from loginSystem.views import loadLoginPage
|
from loginSystem.views import loadLoginPage
|
||||||
import os
|
import os
|
||||||
from plogical.CyberCPLogFileWriter import CyberCPLogFileWriter as logging
|
from plogical.CyberCPLogFileWriter import CyberCPLogFileWriter as logging
|
||||||
from django.shortcuts import HttpResponse
|
|
||||||
from django.views.decorators.csrf import csrf_exempt
|
from django.views.decorators.csrf import csrf_exempt
|
||||||
|
|
||||||
def loadBackupHome(request):
|
def loadBackupHome(request):
|
||||||
|
|||||||
@@ -24,10 +24,13 @@ def router(request):
|
|||||||
if admin.api == 0:
|
if admin.api == 0:
|
||||||
return cm.ajaxPre(0, 'API Access Disabled.')
|
return cm.ajaxPre(0, 'API Access Disabled.')
|
||||||
|
|
||||||
if cm.verifyLogin(request)[0] == 1:
|
try:
|
||||||
pass
|
if cm.verifyLogin(request)[0] == 1:
|
||||||
else:
|
pass
|
||||||
return cm.verifyLogin(request)[1]
|
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
|
## Debug Log
|
||||||
|
|||||||
@@ -560,7 +560,8 @@ class MailServerManager(multi.Thread):
|
|||||||
|
|
||||||
if os.path.exists(postfixMapPath):
|
if os.path.exists(postfixMapPath):
|
||||||
|
|
||||||
postfixMapData = open(postfixMapPath, 'r').read()
|
postfixMapData = open(postfixMapPath, 'r', encoding='utf-8').read()
|
||||||
|
|
||||||
|
|
||||||
if postfixMapData.find(selectedDomain) == -1:
|
if postfixMapData.find(selectedDomain) == -1:
|
||||||
mailConfigured = 0
|
mailConfigured = 0
|
||||||
|
|||||||
Reference in New Issue
Block a user