mirror of
https://mau.dev/maunium/synapse.git
synced 2024-11-04 13:49:15 +01:00
Merge pull request #775 from matrix-org/erikj/password_hash
Correctly handle NULL password hashes from the database
This commit is contained in:
commit
108434e53d
1 changed files with 4 additions and 1 deletions
|
@ -615,4 +615,7 @@ class AuthHandler(BaseHandler):
|
||||||
Returns:
|
Returns:
|
||||||
Whether self.hash(password) == stored_hash (bool).
|
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 a new issue