Bug 319582

Summary: Digital Credentials get(): request with unsupported protocol and non-serializable data throws TypeError instead of being skipped
Product: WebKit Reporter: Marcos Caceres <marcosc>
Component: WebCore Misc.Assignee: Marcos Caceres <marcosc>
Status: RESOLVED FIXED    
Severity: Normal CC: webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 268516    

Marcos Caceres
Reported 2026-07-16 07:33:44 PDT
navigator.credentials.get() with a digital member throws a TypeError for a request that has an unsupported protocol when that request's data is not JSON-serializable (for example, contains a BigInt), instead of skipping the unsupported-protocol request. In Source/WebCore/Modules/identity/DigitalCredential.cpp, each request's data is checked for JSON-serializability before the request's protocol is checked for support. A request whose protocol is not supported should be skipped regardless of whether its data is serializable; a request whose protocol IS supported and whose data is not serializable should still throw. Per the Digital Credentials spec "validate credential requests" steps, an unsupported protocol is skipped (continue) before the data is serialized. The web-platform-tests digital-credentials/get.https.html covers this with the "skip the unknown/bogus ones and not fail" subtests, which currently fail in WebKit because the serialization check runs first.
Attachments
Radar WebKit Bug Importer
Comment 1 2026-07-16 07:33:50 PDT
Marcos Caceres
Comment 2 2026-07-16 08:33:34 PDT
EWS
Comment 3 2026-07-20 18:59:23 PDT
Committed 317592@main (4867cdb405b8): <https://commits.webkit.org/317592@main> Reviewed commits have been landed. Closing PR #69567 and removing active labels.
Note You need to log in before you can comment on or make changes to this bug.