mirror of
https://github.com/Kozea/Radicale.git
synced 2025-04-04 21:57:43 +03:00
catch ValueError on verify, adjust log level for failed logins
This commit is contained in:
parent
a284d18c16
commit
41ab96e142
1 changed files with 7 additions and 3 deletions
|
@ -286,12 +286,16 @@ class Auth(auth.BaseAuth):
|
||||||
login_ok = True
|
login_ok = True
|
||||||
|
|
||||||
if login_ok is True:
|
if login_ok is True:
|
||||||
(method, password_ok) = self._verify(digest, password)
|
try:
|
||||||
|
(method, password_ok) = self._verify(digest, password)
|
||||||
|
except ValueError as e:
|
||||||
|
logger.warning("Login verification failed for user: '%s' (method '%s') %s", login, self._encryption, e)
|
||||||
|
return ""
|
||||||
logger.debug("Login verification successful for user: '%s' (method '%s')", login, method)
|
logger.debug("Login verification successful for user: '%s' (method '%s')", login, method)
|
||||||
if password_ok:
|
if password_ok:
|
||||||
return login
|
return login
|
||||||
else:
|
else:
|
||||||
logger.debug("Login verification failed for user: '%s' ( method '%s')", login, method)
|
logger.warning("Login verification failed for user: '%s' (method '%s')", login, method)
|
||||||
else:
|
else:
|
||||||
logger.debug("Login verification user not found: '%s'", login)
|
logger.warning("Login verification user not found: '%s'", login)
|
||||||
return ""
|
return ""
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue