Summary: | WebAuthn API Error message poorly written for missing pubKeyCredParams | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Justin Lowery <info> | ||||||||
Component: | WebCore Misc. | Assignee: | pascoe <pascoe> | ||||||||
Status: | RESOLVED FIXED | ||||||||||
Severity: | Minor | CC: | bfulgham, ews-watchlist, jiewen_tan, pascoe, webkit-bug-importer | ||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||
Version: | Safari 15 | ||||||||||
Hardware: | Mac (Intel) | ||||||||||
OS: | macOS 11 | ||||||||||
Bug Depends on: | |||||||||||
Bug Blocks: | 237109 | ||||||||||
Attachments: |
|
Description
Justin Lowery
2022-01-20 14:20:18 PST
Created attachment 452915 [details]
Patch
Created attachment 452991 [details]
Patch
Comment on attachment 452991 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=452991&action=review > Source/WebCore/Modules/webauthn/AuthenticatorCoordinator.cpp:144 > + promise.reject(Exception { NotSupportedError, "No desired properties of the to be created credential are provided (No valid values in options.pubKeyCredParams)."_s }); This message is strangely worded. Is it defined by a spec? Actually, doesn't step 10 say [1]: [... if options.pubKeyCredParams's size is zero]: "ero Append the following pairs of PublicKeyCredentialType and COSEAlgorithmIdentifier values to credTypesAndPubKeyAlgs: public-key and -7 ("ES256"). public-key and -257 ("RS256"). [1] "https://www.w3.org/TR/webauthn-2/#CreateCred-DetermineRpId Comment on attachment 452991 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=452991&action=review >> Source/WebCore/Modules/webauthn/AuthenticatorCoordinator.cpp:144 >> + promise.reject(Exception { NotSupportedError, "No desired properties of the to be created credential are provided (No valid values in options.pubKeyCredParams)."_s }); > > This message is strangely worded. Is it defined by a spec? > > Actually, doesn't step 10 say [1]: > > [... if options.pubKeyCredParams's size is zero]: "ero > Append the following pairs of PublicKeyCredentialType and COSEAlgorithmIdentifier values to credTypesAndPubKeyAlgs: > > public-key and -7 ("ES256"). > public-key and -257 ("RS256"). > > [1] "https://www.w3.org/TR/webauthn-2/#CreateCred-DetermineRpId At any rate, maybe the message could be something like: "Unable to create a credential because options.pubKeyCredParams is empty"? Created attachment 453021 [details]
Patch
Comment on attachment 453021 [details]
Patch
r=me
Committed r290392 (247706@main): <https://commits.webkit.org/247706@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 453021 [details]. This fix shipped with Safari 15.5 (all platforms). |