Closed Bug 2056532 Opened 4 months ago Closed 4 months ago

[wpt-sync] Sync PR 61437 - [WebAudio] Enforce speaker-selection permissions policy in setSinkId

Categories

(Core :: DOM: Security, task, P4)

task

Tracking

()

RESOLVED FIXED
155 Branch
Tracking Status
firefox155 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Attachments

(1 file)

Sync web-platform-tests PR 61437 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/61437
Details from upstream follow.

Hongchan Choi <hongchan@google.com> wrote:

[WebAudio] Enforce speaker-selection permissions policy in setSinkId

Enforce the 'speaker-selection' permissions policy in
AudioContext.setSinkId() on the renderer side, and ensure the browser
side checks the policy before validating the device ID.

Previously, AudioContext.setSinkId() did not check the policy, leading
to incorrect NotFoundError exceptions instead of NotAllowedError when
the policy was disabled and an invalid device ID was used.

Similarly, the browser-side AudioOutputAuthorizationHandler validated
the device ID before checking the policy, causing the same issue.

We now check the policy early in Blink, and defer the device ID
validation in the browser until after the policy check.

Bug: 40876498
Test: Run run_wpt_tests.py with
Change-Id: I990a01ad8472ce652619e21ab8b980c20fa8fb70
external/wpt/permissions-policy/speaker-selection-*
TAG=agy
CONV=4e2f1dcf-7770-427b-a524-e92369d8aaab
Reviewed-on: https://chromium-review.googlesource.com/8117150
WPT-Export-Revision: d2bd627c04204b197fb9f2f5c3ed8f5571823820

Component: web-platform-tests → DOM: Security
Product: Testing → Core
Attached file Notable wpt changes —

CI Results

Ran 9 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI

Total 117 tests

Status Summary

Firefox

OK : 2[GitHub] 87[Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt] 91[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview]
PASS : 3[GitHub] 52[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview] 62[Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]
FAIL : 4[GitHub] 465[Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt] 466[Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt] 481[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview]
ERROR : 1
NOTRUN: 1

Chrome

OK : 2
PASS : 3
FAIL : 4

Safari

OK : 2
PASS : 3
FAIL : 4

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

(See attachment for full changes)

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: