Skip to content

Commit

Permalink
Add robustness to password check
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelgrinberg committed Apr 21, 2016
1 parent efc3c72 commit 051fd88
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion flask_httpauth.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,8 @@ def authenticate(self, auth, stored_password):
except TypeError:
client_password = self.hash_password_callback(username,
client_password)
return client_password == stored_password
return client_password is not None and \
client_password == stored_password


class HTTPDigestAuth(HTTPAuth):
Expand Down

0 comments on commit 051fd88

Please sign in to comment.