summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorErik Johnston <erikj@jki.re>2016-06-16 10:12:17 +0100
committerGitHub <noreply@github.com>2016-06-16 10:12:17 +0100
commit486b9a6a2d285023c23ce509c36deba1de71b844 (patch)
tree2a41e4678fc3dbf56944abf0af2c97ccdd6792d8 /synapse
parentMerge pull request #872 from matrix-org/erikj/preview_url_fixes (diff)
parentFix TypeError in call to bcrypt.hashpw (diff)
downloadsynapse-486b9a6a2d285023c23ce509c36deba1de71b844.tar.xz
Merge pull request #873 from vt0r/bugfix/bcrypt-utf8-encode
Fix TypeError in call to bcrypt.hashpw
Diffstat (limited to 'synapse')
-rw-r--r--synapse/handlers/auth.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/synapse/handlers/auth.py b/synapse/handlers/auth.py
index 200793b5ed..b38f81e999 100644
--- a/synapse/handlers/auth.py
+++ b/synapse/handlers/auth.py
@@ -626,6 +626,6 @@ class AuthHandler(BaseHandler):
             Whether self.hash(password) == stored_hash (bool).
         """
         if stored_hash:
-            return bcrypt.hashpw(password, stored_hash) == stored_hash
+            return bcrypt.hashpw(password, stored_hash.encode('utf-8')) == stored_hash
         else:
             return False