mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 10:46:06 -04:00
Correctly handle NULL password hashes from the database
This commit is contained in:
parent
ae1af262f6
commit
1400bb1663
1 changed files with 4 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue