diff options
author | Salvatore LaMendola <salvatore.lamendola@gmail.com> | 2016-06-16 00:43:42 -0400 |
---|---|---|
committer | Salvatore LaMendola <salvatore.lamendola@gmail.com> | 2016-06-16 00:43:42 -0400 |
commit | ed5f43a55accc8502a60b721871b208db704de3e (patch) | |
tree | a966485ef29f72a9f776e0bda8c1dacb280f9525 /synapse/handlers/auth.py | |
parent | Merge pull request #867 from matrix-org/markjh/enable_jenkins_synchrotron (diff) | |
download | synapse-ed5f43a55accc8502a60b721871b208db704de3e.tar.xz |
Fix TypeError in call to bcrypt.hashpw
- At the very least, this TypeError caused logins to fail on my own running instance of Synapse, and the simple (explicit) UTF-8 conversion resolved login errors for me. Signed-off-by: Salvatore LaMendola <salvatore.lamendola@gmail.com>
Diffstat (limited to 'synapse/handlers/auth.py')
-rw-r--r-- | synapse/handlers/auth.py | 2 |
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 |