Use and instead of &

Cosmetic change
This commit is contained in:
Unrud 2017-09-17 14:03:48 +02:00
parent a9e5e00624
commit 2c0669046c

View File

@ -227,7 +227,7 @@ class Auth(BaseAuth):
# timing attacks, see #591. # timing 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: if login_ok and password_ok:
return True return True
except ValueError as e: except ValueError as e:
raise RuntimeError("Invalid htpasswd file %r: %s" % raise RuntimeError("Invalid htpasswd file %r: %s" %