mirror of
https://github.com/Kozea/Radicale.git
synced 2025-06-26 16:45:52 +00:00
Use "&" instead of "+" to test booleans
This commit is contained in:
parent
85e8336361
commit
22d364729b
1 changed files with 1 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue