Skip to content

Commit

Permalink
Merge pull request #242 from venth/improve_multiple_fido2_authenticators
Browse files Browse the repository at this point in the history
Avoid exception when multiple FIDO authenticators are present
  • Loading branch information
pdecat authored Jun 3, 2022
2 parents 4b38251 + a563d98 commit b2a1233
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 4 additions & 2 deletions aws_adfs/_duo_authenticator.py
Original file line number Diff line number Diff line change
Expand Up @@ -359,8 +359,10 @@ def _webauthn_get_assertion(device, webauthn_credential_request_options, duo_hos

click.echo("Got response from FIDO U2F / FIDO2 authenticator: '{}'".format(device), err=True)
rq.put(_submit_webauthn_response(duo_host, sid, webauthn_response, session, ssl_verification_enabled))
except:
raise
except Exception as e:
logging.debug("Got an exception while waiting for {}: {}".format(device, e))
if not cancel.is_set():
raise
finally:
# Cancel the other FIDO U2F / FIDO2 prompts
cancel.set()
Expand Down
6 changes: 4 additions & 2 deletions aws_adfs/_duo_universal_prompt_authenticator.py
Original file line number Diff line number Diff line change
Expand Up @@ -364,8 +364,10 @@ def _webauthn_get_assertion(
err=True,
)
rq.put(_submit_webauthn_response(duo_host, sid, webauthn_response, session, ssl_verification_enabled))
except:
raise
except Exception as e:
logging.debug("Got an exception while waiting for {}: {}".format(device, e))
if not cancel.is_set():
raise
finally:
# Cancel the other FIDO U2F / FIDO2 prompts
cancel.set()
Expand Down

0 comments on commit b2a1233

Please sign in to comment.