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.
|
# attacks, see #591.
|
||||||
login_ok = hmac.compare_digest(login, user)
|
login_ok = hmac.compare_digest(login, user)
|
||||||
password_ok = self.verify(hash_value, password)
|
password_ok = self.verify(hash_value, password)
|
||||||
if login_ok + password_ok == 2:
|
if login_ok & password_ok:
|
||||||
return True
|
return True
|
||||||
return False
|
return False
|
||||||
|
Loading…
Reference in New Issue
Block a user