diff options
author | Erik Johnston <erik@matrix.org> | 2016-05-11 12:18:13 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2016-05-11 12:18:13 +0100 |
commit | 108434e53da3fd90655ef5249fb9a0d0e97a0e00 (patch) | |
tree | 698ff75c0ffc8feb6337dec517f39b882bf39701 /synapse/handlers/auth.py | |
parent | Merge pull request #774 from matrix-org/markjh/shuffle_base_handler (diff) | |
parent | Correctly handle NULL password hashes from the database (diff) | |
download | synapse-108434e53da3fd90655ef5249fb9a0d0e97a0e00.tar.xz |
Merge pull request #775 from matrix-org/erikj/password_hash
Correctly handle NULL password hashes from the database
Diffstat (limited to 'synapse/handlers/auth.py')
-rw-r--r-- | synapse/handlers/auth.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/synapse/handlers/auth.py b/synapse/handlers/auth.py index 61fe56032a..6e7d080ecc 100644 --- a/synapse/handlers/auth.py +++ b/synapse/handlers/auth.py @@ -615,4 +615,7 @@ class AuthHandler(BaseHandler): Returns: Whether self.hash(password) == stored_hash (bool). """ - return bcrypt.hashpw(password, stored_hash) == stored_hash + if stored_hash: + return bcrypt.hashpw(password, stored_hash) == stored_hash + else: + return False |