Reviewers: ,
Please review this at http://codereview.tryton.org/582004/
Affected files:
M trytond/protocols/dispatcher.py
M trytond/security.py
Index: trytond/protocols/dispatcher.py
===================================================================
--- a/trytond/protocols/dispatcher.py
+++ b/trytond/protocols/dispatcher.py
@@ -237,7 +237,8 @@
'WHERE code = %s', 1) + ')' \
'WHERE login <> \'root\'', (lang,))
if hashlib:
- admin_password = hashlib.sha1(admin_password).hexdigest()
+ admin_password =
hashlib.sha1(admin_password.encode('utf-8'))\
+ .hexdigest()
else:
admin_password = sha.new(admin_password).hexdigest()
cursor.execute('UPDATE res_user ' \
Index: trytond/security.py
===================================================================
--- a/trytond/security.py
+++ b/trytond/security.py
@@ -18,7 +18,6 @@
with Transaction().start(dbname, 0) as transaction:
pool = _get_pool(dbname)
User = pool.get('res.user')
- password = password.decode('utf-8')
user_id = User.get_login(loginname, password)
transaction.cursor.commit()
if user_id:
--
[email protected] mailing list