Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect use of options variable in create() and get() definitions #1752

Closed
emlun opened this issue Jun 21, 2022 · 0 comments · Fixed by #1805
Closed

Incorrect use of options variable in create() and get() definitions #1752

emlun opened this issue Jun 21, 2022 · 0 comments · Fixed by #1805

Comments

@emlun
Copy link
Member

emlun commented Jun 21, 2022

§5.1.3. Create a New Credential and §5.1.4. Use an Existing Credential to Make an Assertion both declare their options parameter as the Credential[Creation|Request]Options object inherited from CredMan:

options
This argument is a CredentialCreationOptions object whose options.publicKey member contains a PublicKeyCredentialCreationOptions object [...]

Both also re-assign the options variable:

Let options be the value of options.publicKey.

But both then also reference options.signal, which is a member of Credential[Creation|Request]Options but not PublicKeyCredential[Creation|Request]Options:

If options.signal is present and aborted, throw the options.signal’s abort reason.

For correctness, we need to keep a reference to the options inherited from CredMan and either introduce a new variable for its options.pubKey attribute, or simply reference the WebAuthn-specific parameters using the options.pubKey prefix.

@emlun emlun self-assigned this Jun 21, 2022
@emlun emlun changed the title Incorrect use of _options_ variable in create() and get() definitions Incorrect use of options variable in create() and get() definitions Jun 21, 2022
@nadalin nadalin added this to the L3-WD-01 milestone Sep 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment