mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2026-05-10 17:17:36 +02:00
Merge branch 'v2.0.2' into stable
This commit is contained in:
@@ -279,6 +279,10 @@ class emailMarketing(multi.Thread):
|
||||
else:
|
||||
self.verifyHost = SMTPHosts.objects.get(host=self.extraArgs['host'])
|
||||
self.smtpServer = smtplib.SMTP(str(self.verifyHost.host), int(self.verifyHost.port))
|
||||
|
||||
if int(self.verifyHost.port) == 587:
|
||||
self.smtpServer.starttls()
|
||||
|
||||
self.smtpServer.login(str(self.verifyHost.userName), str(self.verifyHost.password))
|
||||
return 1
|
||||
except smtplib.SMTPHeloError:
|
||||
|
||||
@@ -517,6 +517,10 @@ class EmailMarketingManager:
|
||||
|
||||
try:
|
||||
verifyLogin = smtplib.SMTP(str(smtpHost), int(smtpPort))
|
||||
|
||||
if int(smtpPort) == 587:
|
||||
verifyLogin.starttls()
|
||||
|
||||
verifyLogin.login(str(smtpUserName), str(smtpPassword))
|
||||
|
||||
admin = Administrator.objects.get(pk=userID)
|
||||
@@ -618,6 +622,10 @@ class EmailMarketingManager:
|
||||
try:
|
||||
verifyHost = SMTPHosts.objects.get(id=id)
|
||||
verifyLogin = smtplib.SMTP(str(verifyHost.host), int(verifyHost.port))
|
||||
|
||||
if int(verifyHost.port) == 587:
|
||||
verifyLogin.starttls()
|
||||
|
||||
verifyLogin.login(str(verifyHost.userName), str(verifyHost.password))
|
||||
|
||||
data_ret = {"status": 1, 'message': 'Login successful.'}
|
||||
|
||||
@@ -258,6 +258,8 @@ class FileManager:
|
||||
|
||||
self.changeOwner(self.data['newPath'])
|
||||
|
||||
self.fixPermissions(domainName)
|
||||
|
||||
json_data = json.dumps(finalData)
|
||||
return HttpResponse(json_data)
|
||||
|
||||
|
||||
@@ -1439,7 +1439,7 @@ class Upgrade:
|
||||
command = 'git status'
|
||||
currentBranch = subprocess.check_output(shlex.split(command)).decode()
|
||||
|
||||
if currentBranch.find('On branch %s' % (branch)) > -1:
|
||||
if currentBranch.find('On branch %s' % (branch)) > -1 and currentBranch.find('On branch %s-dev' % (branch)) == -1:
|
||||
|
||||
command = 'git stash'
|
||||
Upgrade.executioner(command, command, 1)
|
||||
|
||||
Reference in New Issue
Block a user