From b1bd172f41f355b1fab9e99f798f971f4e087f00 Mon Sep 17 00:00:00 2001 From: Raymond Penners Date: Fri, 8 Nov 2024 11:25:55 +0100 Subject: [PATCH] fix(headless): Handle fido2 ValueError on bad data --- allauth/mfa/webauthn/internal/auth.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/allauth/mfa/webauthn/internal/auth.py b/allauth/mfa/webauthn/internal/auth.py index 86fc82044d..d0751d7aa4 100644 --- a/allauth/mfa/webauthn/internal/auth.py +++ b/allauth/mfa/webauthn/internal/auth.py @@ -130,7 +130,7 @@ def get_authenticator_by_credential_id( def parse_authentication_response(response: Any) -> AuthenticationResponse: try: return AuthenticationResponse.from_dict(response) - except TypeError: + except (TypeError, ValueError): raise get_adapter().validation_error("incorrect_code")