Skip to content

Commit

Permalink
Do not raise an exception when cancel is set while waiting for FIDO a…
Browse files Browse the repository at this point in the history
…uthenticator, as it probably means one of the other available authenticators when activated
  • Loading branch information
pdecat committed Jun 3, 2022
1 parent 4b38251 commit a563d98
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 a563d98

Please sign in to comment.