From ff33380bedd3924759ecbfbea3481367e9f95a71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adri=C3=A0=20Casaj=C3=BAs?= Date: Tue, 26 Apr 2022 18:41:12 +0200 Subject: [PATCH 1/2] Do not send the transports to the js part since we have not stored them previously --- app/auth/views/fido.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/auth/views/fido.py b/app/auth/views/fido.py index eba5ea5c..d44f83f8 100644 --- a/app/auth/views/fido.py +++ b/app/auth/views/fido.py @@ -153,6 +153,12 @@ def fido(): webauthn_users, challenge ) webauthn_assertion_options = webauthn_assertion_options.assertion_dict + try: + # HACK: We need to upgrade to webauthn > 1 so it can support specifying the transports + del webauthn_assertion_options["allowCredentials"][0]["transports"] + except KeyError: + # Should never happen but... + pass return render_template( "auth/fido.html", From 657cae53a675e38afeef97e42714dc0bede01be7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adri=C3=A0=20Casaj=C3=BAs?= Date: Tue, 26 Apr 2022 18:44:57 +0200 Subject: [PATCH 2/2] Remove it for all creds --- app/auth/views/fido.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/auth/views/fido.py b/app/auth/views/fido.py index d44f83f8..c65a6ff5 100644 --- a/app/auth/views/fido.py +++ b/app/auth/views/fido.py @@ -155,7 +155,8 @@ def fido(): webauthn_assertion_options = webauthn_assertion_options.assertion_dict try: # HACK: We need to upgrade to webauthn > 1 so it can support specifying the transports - del webauthn_assertion_options["allowCredentials"][0]["transports"] + for credential in webauthn_assertion_options["allowCredentials"]: + del credential["transports"] except KeyError: # Should never happen but... pass