# HG changeset patch # User Pascal Volk # Date 1272530930 0 # Node ID f2ecfe0a0e099914c7f1d2409cdf3f1cc42ec398 # Parent 524f7ed5ad5be642e5796233448803e93e13bc73 VMM/Account: always pass the EmailAddress to the pwhash() call. diff -r 524f7ed5ad5b -r f2ecfe0a0e09 VirtualMailManager/Account.py --- a/VirtualMailManager/Account.py Thu Apr 29 05:57:53 2010 +0000 +++ b/VirtualMailManager/Account.py Thu Apr 29 08:48:50 2010 +0000 @@ -244,8 +244,9 @@ self._prepare(MailLocation(format=cfg_dget('mailbox.format'))) sql = "INSERT INTO users (local_part, passwd, uid, gid, mid, tid,\ smtp, pop3, imap, %s) VALUES ('%s', '%s', %d, %d, %d, %d, %s, %s, %s, %s)" % ( - sieve_col, self._addr.localpart, pwhash(self._passwd), self._uid, - self._domain.gid, self._mid, self._transport.tid, + sieve_col, self._addr.localpart, pwhash(self._passwd, + user=self._addr), + self._uid, self._domain.gid, self._mid, self._transport.tid, cfg_dget('account.smtp'), cfg_dget('account.pop3'), cfg_dget('account.imap'), cfg_dget('account.sieve')) dbc = self._dbh.cursor() @@ -273,7 +274,7 @@ dbc = self._dbh.cursor() if field == 'password': dbc.execute('UPDATE users SET passwd = %s WHERE uid = %s', - pwhash(value), self._uid) + pwhash(value, user=self._addr), self._uid) elif field == 'transport': if value != self._transport.transport: self._transport = Transport(self._dbh, transport=value)