[wpt-sync] Sync PR 38832 - Reject Web USB requests with an opaque origin
Categories
(Core :: DOM: Device Interfaces, task, P4)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox113 | --- | fixed |
People
(Reporter: wpt-sync, Unassigned)
References
()
Details
(Whiteboard: [wptsync downstream])
Sync web-platform-tests PR 38832 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/38832
Details from upstream follow.
Jack Hsieh <chengweih@chromium.org> wrote:
Reject Web USB requests with an opaque origin
The Web USB API tracks permissions using the origin of the top-level
document in the frame tree. If this document has an opaque origin then
there is no way to format the origin for display to the user in
permission prompts or to write their decision in the preferences file.Access to the Web USB API from such contexts should therefore be
blocked.Bug: 1375133
Change-Id: I47952bb230b3fdf0bfbc76f46d1ef91c19fc7ea1
Reviewed-on: https://chromium-review.googlesource.com/4248258
WPT-Export-Revision: d34dfb404ce8fdbe21fc037bc923b17ddc9f4f96
| Assignee | ||
Updated•3 years ago
|
| Assignee | ||
Updated•3 years ago
|
| Assignee | ||
Updated•3 years ago
|
| Assignee | ||
Comment 1•3 years ago
|
||
| Assignee | ||
Comment 2•3 years ago
|
||
CI Results
Ran 9 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI
Total 6 tests and 1 subtests
Status Summary
Firefox
OK : 5
FAIL : 7
TIMEOUT: 2
Chrome
OK : 6
PASS : 6
FAIL : 2
Safari
OK : 5
FAIL : 7
TIMEOUT: 2
Links
Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base
Details
New Tests That Don't Pass
- /webusb/getDevices/reject_opaque_origin.https.html [wpt.fyi]:
OK[GitHub],SKIP[Gecko-android-em-7.0-x86_64-lite-qr-opt-geckoview,Gecko-android-em-7.0-x86_64-qr-debug-geckoview,Gecko-android-em-7.0-x86_64-qr-opt-geckoview,Gecko-linux1804-64-qr-debug,Gecko-linux1804-64-qr-opt,Gecko-windows11-32-2009-qr-debug,Gecko-windows11-32-2009-qr-opt,Gecko-windows11-64-2009-qr-debug,Gecko-windows11-64-2009-qr-opt] (Chrome:OK, Safari:OK)- Calls to USB APIs from an origin with opaque top origin get blocked.:
FAIL(Chrome:FAIL, Safari:FAIL)
- Calls to USB APIs from an origin with opaque top origin get blocked.:
- /webusb/getDevices/sandboxed_iframe.https.window.html [wpt.fyi]:
SKIP[Gecko-android-em-7.0-x86_64-lite-qr-opt-geckoview,Gecko-android-em-7.0-x86_64-qr-debug-geckoview,Gecko-android-em-7.0-x86_64-qr-opt-geckoview,Gecko-linux1804-64-qr-debug,Gecko-linux1804-64-qr-opt,Gecko-windows11-32-2009-qr-debug,Gecko-windows11-32-2009-qr-opt,Gecko-windows11-64-2009-qr-debug,Gecko-windows11-64-2009-qr-opt],TIMEOUT[GitHub] (Chrome:OK, Safari:TIMEOUT)- GetDevices from a sandboxed iframe is valid.:
TIMEOUT(Chrome:PASS, Safari:TIMEOUT)
- GetDevices from a sandboxed iframe is valid.:
- /webusb/requestDevice/reject_opaque_origin.https.html [wpt.fyi]:
OK[GitHub],SKIP[Gecko-android-em-7.0-x86_64-lite-qr-opt-geckoview,Gecko-android-em-7.0-x86_64-qr-debug-geckoview,Gecko-android-em-7.0-x86_64-qr-opt-geckoview,Gecko-linux1804-64-qr-debug,Gecko-linux1804-64-qr-opt,Gecko-windows11-32-2009-qr-debug,Gecko-windows11-32-2009-qr-opt,Gecko-windows11-64-2009-qr-debug,Gecko-windows11-64-2009-qr-opt] (Chrome:OK, Safari:OK)- Calls to USB APIs from an origin with opaque top origin get blocked.:
FAIL(Chrome:PASS, Safari:FAIL)
- Calls to USB APIs from an origin with opaque top origin get blocked.:
- /webusb/requestDevice/sandboxed_iframe.https.window.html [wpt.fyi]:
OK[GitHub],SKIP[Gecko-android-em-7.0-x86_64-lite-qr-opt-geckoview,Gecko-android-em-7.0-x86_64-qr-debug-geckoview,Gecko-android-em-7.0-x86_64-qr-opt-geckoview,Gecko-linux1804-64-qr-debug,Gecko-linux1804-64-qr-opt,Gecko-windows11-32-2009-qr-debug,Gecko-windows11-32-2009-qr-opt,Gecko-windows11-64-2009-qr-debug,Gecko-windows11-64-2009-qr-opt] (Chrome:OK, Safari:OK)- RequestDevice from a sandboxed iframe is valid.:
FAIL(Chrome:FAIL, Safari:FAIL)
- RequestDevice from a sandboxed iframe is valid.:
- /webusb/usbDevice-iframe.https.html [wpt.fyi]:
OK[GitHub],SKIP[Gecko-android-em-7.0-x86_64-lite-qr-opt-geckoview,Gecko-android-em-7.0-x86_64-qr-debug-geckoview,Gecko-android-em-7.0-x86_64-qr-opt-geckoview,Gecko-linux1804-64-qr-debug,Gecko-linux1804-64-qr-opt,Gecko-windows11-32-2009-qr-debug,Gecko-windows11-32-2009-qr-opt,Gecko-windows11-64-2009-qr-debug,Gecko-windows11-64-2009-qr-opt] (Chrome:OK, Safari:OK)- detaching iframe disconnects device.:
FAIL(Chrome:PASS, Safari:FAIL) - navigating iframe disconnects device.:
FAIL(Chrome:PASS, Safari:FAIL) - Connect event is not fired in iframe with usb disallowed.:
FAIL(Chrome:PASS, Safari:FAIL)
- detaching iframe disconnects device.:
- /webusb/usbDevice-worker.https.html [wpt.fyi]:
OK[GitHub],SKIP[Gecko-android-em-7.0-x86_64-lite-qr-opt-geckoview,Gecko-android-em-7.0-x86_64-qr-debug-geckoview,Gecko-android-em-7.0-x86_64-qr-opt-geckoview,Gecko-linux1804-64-qr-debug,Gecko-linux1804-64-qr-opt,Gecko-windows11-32-2009-qr-debug,Gecko-windows11-32-2009-qr-opt,Gecko-windows11-64-2009-qr-debug,Gecko-windows11-64-2009-qr-opt] (Chrome:OK, Safari:OK)- terminating worker disconnects device.:
FAIL(Chrome:PASS, Safari:FAIL)
- terminating worker disconnects device.:
Tests Disabled in Gecko Infrastructure
- /webusb/getDevices/reject_opaque_origin.https.html [wpt.fyi]:
OK[GitHub],SKIP[Gecko-android-em-7.0-x86_64-lite-qr-opt-geckoview,Gecko-android-em-7.0-x86_64-qr-debug-geckoview,Gecko-android-em-7.0-x86_64-qr-opt-geckoview,Gecko-linux1804-64-qr-debug,Gecko-linux1804-64-qr-opt,Gecko-windows11-32-2009-qr-debug,Gecko-windows11-32-2009-qr-opt,Gecko-windows11-64-2009-qr-debug,Gecko-windows11-64-2009-qr-opt] (Chrome:OK, Safari:OK) - /webusb/getDevices/sandboxed_iframe.https.window.html [wpt.fyi]:
SKIP[Gecko-android-em-7.0-x86_64-lite-qr-opt-geckoview,Gecko-android-em-7.0-x86_64-qr-debug-geckoview,Gecko-android-em-7.0-x86_64-qr-opt-geckoview,Gecko-linux1804-64-qr-debug,Gecko-linux1804-64-qr-opt,Gecko-windows11-32-2009-qr-debug,Gecko-windows11-32-2009-qr-opt,Gecko-windows11-64-2009-qr-debug,Gecko-windows11-64-2009-qr-opt],TIMEOUT[GitHub] (Chrome:OK, Safari:TIMEOUT) - /webusb/requestDevice/reject_opaque_origin.https.html [wpt.fyi]:
OK[GitHub],SKIP[Gecko-android-em-7.0-x86_64-lite-qr-opt-geckoview,Gecko-android-em-7.0-x86_64-qr-debug-geckoview,Gecko-android-em-7.0-x86_64-qr-opt-geckoview,Gecko-linux1804-64-qr-debug,Gecko-linux1804-64-qr-opt,Gecko-windows11-32-2009-qr-debug,Gecko-windows11-32-2009-qr-opt,Gecko-windows11-64-2009-qr-debug,Gecko-windows11-64-2009-qr-opt] (Chrome:OK, Safari:OK) - /webusb/requestDevice/sandboxed_iframe.https.window.html [wpt.fyi]:
OK[GitHub],SKIP[Gecko-android-em-7.0-x86_64-lite-qr-opt-geckoview,Gecko-android-em-7.0-x86_64-qr-debug-geckoview,Gecko-android-em-7.0-x86_64-qr-opt-geckoview,Gecko-linux1804-64-qr-debug,Gecko-linux1804-64-qr-opt,Gecko-windows11-32-2009-qr-debug,Gecko-windows11-32-2009-qr-opt,Gecko-windows11-64-2009-qr-debug,Gecko-windows11-64-2009-qr-opt] (Chrome:OK, Safari:OK) - /webusb/usbDevice-iframe.https.html [wpt.fyi]:
OK[GitHub],SKIP[Gecko-android-em-7.0-x86_64-lite-qr-opt-geckoview,Gecko-android-em-7.0-x86_64-qr-debug-geckoview,Gecko-android-em-7.0-x86_64-qr-opt-geckoview,Gecko-linux1804-64-qr-debug,Gecko-linux1804-64-qr-opt,Gecko-windows11-32-2009-qr-debug,Gecko-windows11-32-2009-qr-opt,Gecko-windows11-64-2009-qr-debug,Gecko-windows11-64-2009-qr-opt] (Chrome:OK, Safari:OK) - /webusb/usbDevice-worker.https.html [wpt.fyi]:
OK[GitHub],SKIP[Gecko-android-em-7.0-x86_64-lite-qr-opt-geckoview,Gecko-android-em-7.0-x86_64-qr-debug-geckoview,Gecko-android-em-7.0-x86_64-qr-opt-geckoview,Gecko-linux1804-64-qr-debug,Gecko-linux1804-64-qr-opt,Gecko-windows11-32-2009-qr-debug,Gecko-windows11-32-2009-qr-opt,Gecko-windows11-64-2009-qr-debug,Gecko-windows11-64-2009-qr-opt] (Chrome:OK, Safari:OK)
Comment 4•3 years ago
|
||
| bugherder | ||
Description
•