Merge pull request #775 from matrix-org/erikj/password_hash
Correctly handle NULL password hashes from the databasepull/776/head
commit
108434e53d
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue