Skip to content

Commit

Permalink
fixed new password generation for iredadmin free version
Browse files Browse the repository at this point in the history
  • Loading branch information
rvojcik committed Feb 19, 2015
1 parent 5579926 commit 0099572
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions email-manage-free.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ def add_object(domain, mailbox):

if settings.STORE_PASSWORD_IN_PLAIN_TEXT:
pwscheme = 'PLAIN'
password = iredutils.generate_password_for_sql_mail_account(random_string, pwscheme=pwscheme)
password = iredutils.generate_password_hash(random_string, pwscheme=pwscheme)

maildir = iredutils.generate_maildir_path(mailbox)

Expand Down Expand Up @@ -346,7 +346,7 @@ def action_changepass(mailbox, pass_from_prompt):

if settings.STORE_PASSWORD_IN_PLAIN_TEXT:
pwscheme = 'PLAIN'
password = iredutils.generate_password_for_sql_mail_account(random_string, pwscheme=pwscheme)
password = iredutils.generate_password_hash(random_string, pwscheme=pwscheme)

# Now update password field in database
sql = "UPDATE mailbox set password = '%s' WHERE username = '%s'" % (password, mailbox)
Expand Down

0 comments on commit 0099572

Please sign in to comment.