From dc8af84563c81dc29cc560d3c20b82bb7c552811 Mon Sep 17 00:00:00 2001 From: Ameya Shenoy Date: Fri, 4 May 2018 18:36:27 +0530 Subject: [PATCH] Login fix for python3 (#5529) decode bytes to string --- frappe/utils/password.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frappe/utils/password.py b/frappe/utils/password.py index ea47783da4..3784720777 100644 --- a/frappe/utils/password.py +++ b/frappe/utils/password.py @@ -21,7 +21,7 @@ class LegacyPassword(pbkdf2_sha256): # it is possible that we will generate a false positive if the users password happens to be 40 hex chars proceeded # by an * char, but this seems highly unlikely if not (secret[0] == "*" and len(secret) == 41 and all(c in string.hexdigits for c in secret[1:])): - secret = mysql41.hash(secret + self.salt) + secret = mysql41.hash(secret + self.salt.decode('utf-8')) return super(LegacyPassword, self)._calc_checksum(secret)