Use "&" instead of "+" to test booleans
This commit is contained in:
parent
85e8336361
commit
22d364729b
@ -198,6 +198,6 @@ class Auth(BaseAuth):
|
||||
# attacks, see #591.
|
||||
login_ok = hmac.compare_digest(login, user)
|
||||
password_ok = self.verify(hash_value, password)
|
||||
if login_ok + password_ok == 2:
|
||||
if login_ok & password_ok:
|
||||
return True
|
||||
return False
|
||||
|
Loading…
Reference in New Issue
Block a user