Digital Credentials: Missing empty-vector guard after request validation allows empty picker presentation
https://bugs.webkit.org/show_bug.cgi?id=314382 rdar://176536555 Reviewed by Anne van Kesteren. Per the Digital Credentials spec's "prepare credential requests" algorithm, if the validated requests list is empty (all requests filtered out during validation), reject with a TypeError before presenting the picker. Implement this guard in CredentialRequestCoordinator::prepareCredentialRequests, immediately after the validation step, matching the spec rather than guarding at the WebProcess boundary. Test: http/tests/digital-credentials/digital-credential-all-invalid-requests.https.html * LayoutTests/http/tests/digital-credentials/digital-credential-all-invalid-requests.https-expected.txt: Added. * LayoutTests/http/tests/digital-credentials/digital-credential-all-invalid-requests.https.html: Added. * Source/WebCore/Modules/identity/CredentialRequestCoordinator.cpp: (WebCore::CredentialRequestCoordinator::prepareCredentialRequests): * LayoutTests/http/wpt/identity/formats/ISO18013/mixed-requests.https-expected.txt: * LayoutTests/http/wpt/identity/formats/ISO18013/mixed-requests.https.html: Canonical link: https://commits.webkit.org/317276@main
M
Marcos Caceres committed
fa01ab0b2a9ca21b9a8228e9da5bf3d58d9283f7
Parent: 5da0c4f