modified basic_auth.check_login to check that the user has a pw_hash first

This commit is contained in:
Rodney Ewing 2013-05-23 13:20:13 -07:00
parent 569873d8f0
commit 09ae2df4eb

View File

@ -28,9 +28,10 @@ def setup_plugin():
def check_login(user, password):
result = auth_lib.bcrypt_check_password(password, user.pw_hash)
if result:
return result
if user.pw_hash:
result = auth_lib.bcrypt_check_password(password, user.pw_hash)
if result:
return result
return None