Skip to content
Snippets Groups Projects
Commit 108434e5 authored by Erik Johnston's avatar Erik Johnston
Browse files

Merge pull request #775 from matrix-org/erikj/password_hash

Correctly handle NULL password hashes from the database
parents a284a32d 1400bb16
No related branches found
No related tags found
No related merge requests found
......@@ -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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment