summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorMatthew Hodgson <matthew@arasphere.net>2016-12-20 00:02:13 +0000
committerGitHub <noreply@github.com>2016-12-20 00:02:13 +0000
commit09f15918be80236301b70996006f8914773d6328 (patch)
treef2b50e1d988f7190eaef25540687e2111d30628e /synapse
parentMerge pull request #1709 from kyrias/bind_addresses (diff)
parentfix ability to change password to a non-ascii one (diff)
downloadsynapse-09f15918be80236301b70996006f8914773d6328.tar.xz
Merge pull request #1711 from matrix-org/matthew/utf8-password-change
fix ability to change password to a non-ascii one
Diffstat (limited to 'synapse')
-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