From f2a5aebf98a04bc4250ce2800b51d42543b5f35f Mon Sep 17 00:00:00 2001 From: Matthew Hodgson Date: Sun, 18 Dec 2016 22:25:21 +0000 Subject: fix ability to change password to a non-ascii one https://github.com/vector-im/riot-web/issues/2658 --- synapse/handlers/auth.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/synapse/handlers/auth.py b/synapse/handlers/auth.py index 3b146f09d6..652efba455 100644 --- a/synapse/handlers/auth.py +++ b/synapse/handlers/auth.py @@ -656,8 +656,8 @@ class AuthHandler(BaseHandler): Whether self.hash(password) == stored_hash (bool). """ if stored_hash: - return bcrypt.hashpw(password + self.hs.config.password_pepper, - stored_hash.encode('utf-8')) == stored_hash + return bcrypt.hashpw(password.encode('utf8') + self.hs.config.password_pepper, + stored_hash.encode('utf8')) == stored_hash else: return False -- cgit 1.4.1