diff --git a/radicale/auth/htpasswd.py b/radicale/auth/htpasswd.py index e542fd72..88b73cca 100644 --- a/radicale/auth/htpasswd.py +++ b/radicale/auth/htpasswd.py @@ -286,12 +286,16 @@ class Auth(auth.BaseAuth): login_ok = 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) if password_ok: return login 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: - logger.debug("Login verification user not found: '%s'", login) + logger.warning("Login verification user not found: '%s'", login) return ""