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

Correctly handle NULL password hashes from the database

parent ae1af262
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