mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-14 01:06:09 +01:00
securify fix: CP-29: Manage Website – SMTP Hosts – Verify
This commit is contained in:
@@ -599,6 +599,7 @@ class EmailMarketingManager:
|
||||
|
||||
userID = self.request.session['userID']
|
||||
admin = Administrator.objects.get(pk=userID)
|
||||
currentACL = ACLManager.loadedACL(userID)
|
||||
|
||||
if emACL.checkIfEMEnabled(admin.userName) == 0:
|
||||
return ACLManager.loadErrorJson()
|
||||
@@ -610,6 +611,10 @@ class EmailMarketingManager:
|
||||
|
||||
if operation == 'delete':
|
||||
delHost = SMTPHosts.objects.get(id=id)
|
||||
|
||||
if ACLManager.VerifySMTPHost(currentACL, delHost.owner, admin) == 0:
|
||||
return ACLManager.loadErrorJson()
|
||||
|
||||
currentACL = ACLManager.loadedACL(userID)
|
||||
if currentACL['admin'] == 1:
|
||||
pass
|
||||
@@ -622,6 +627,10 @@ class EmailMarketingManager:
|
||||
else:
|
||||
try:
|
||||
verifyHost = SMTPHosts.objects.get(id=id)
|
||||
|
||||
if ACLManager.VerifySMTPHost(currentACL, verifyHost.owner, admin) == 0:
|
||||
return ACLManager.loadErrorJson()
|
||||
|
||||
verifyLogin = smtplib.SMTP(str(verifyHost.host), int(verifyHost.port))
|
||||
|
||||
if int(verifyHost.port) == 587:
|
||||
|
||||
Reference in New Issue
Block a user