summary refs log tree commit diff
path: root/synapse/handlers/auth.py
diff options
context:
space:
mode:
authorMatthew Hodgson <matthew@matrix.org>2016-12-18 22:25:21 +0000
committerMatthew Hodgson <matthew@matrix.org>2016-12-18 22:25:21 +0000
commitf2a5aebf98a04bc4250ce2800b51d42543b5f35f (patch)
treec22408f017f3dad3edb0a81442a45355ea1862ac /synapse/handlers/auth.py
parentCache network room list queries. (diff)
downloadsynapse-f2a5aebf98a04bc4250ce2800b51d42543b5f35f.tar.xz
fix ability to change password to a non-ascii one
https://github.com/vector-im/riot-web/issues/2658
Diffstat (limited to '')
-rw-r--r--synapse/handlers/auth.py4
1 files 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