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
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 | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/182412976>
Marcos Caceres
Pull request: https://github.com/WebKit/WebKit/pull/69567
EWS
Committed 317592@main (4867cdb405b8): <https://commits.webkit.org/317592@main>
Reviewed commits have been landed. Closing PR #69567 and removing active labels.