bug fix: email password

This commit is contained in:
Usman Nasir
2019-12-16 15:48:45 +05:00
parent baad2d68f8
commit 719066b329
3 changed files with 9 additions and 9 deletions

View File

@@ -548,12 +548,12 @@ class MailServerManager:
CentOSPath = '/etc/redhat-release'
if os.path.exists(CentOSPath):
password = bcrypt.hashpw(str(password), bcrypt.gensalt())
password = '{CRYPT}%s' % (password)
password = bcrypt.hashpw(password.encode('utf-8'), bcrypt.gensalt())
password = '{CRYPT}%s' % (password.decode())
emailDB.password = password
else:
password = bcrypt.hashpw(str(password), bcrypt.gensalt())
password = '{CRYPT}%s' % (password)
password = bcrypt.hashpw(password.encode('utf-8'), bcrypt.gensalt())
password = '{CRYPT}%s' % (password.decode())
emailDB.password = password
emailDB.save()