Merge pull request #873 from vt0r/bugfix/bcrypt-utf8-encode

Fix TypeError in call to bcrypt.hashpw
This commit is contained in:
Erik Johnston 2016-06-16 10:12:17 +01:00 committed by GitHub
commit 486b9a6a2d

View File

@ -626,6 +626,6 @@ class AuthHandler(BaseHandler):
Whether self.hash(password) == stored_hash (bool).
"""
if stored_hash:
return bcrypt.hashpw(password, stored_hash) == stored_hash
return bcrypt.hashpw(password, stored_hash.encode('utf-8')) == stored_hash
else:
return False