"media.navigator.permission.disabled" pref should not bypass developer permissions policies (only user prompts)
Categories
(Core :: WebRTC: Audio/Video, task)
Tracking
()
Tracking | Status | |
---|---|---|
firefox92 | --- | fixed |
People
(Reporter: karlt, Assigned: karlt)
References
(Regressed 1 open bug)
Details
Attachments
(4 files)
MediaManager::GetUserMedia()
uses PermissionDelegateHandler::GetPermission()
to see whether the action should be denied without a prompt. This has a check on developer permissions policies via IsFeatureAllowed()
, but also checks user permissions.
When the toplevel context is out of process, WindowContext
fields are used for user permissions. Due to multiple async hops across processes, these are not necessarily up-to-date as hinted in code comments.
The permission checks in GetUserMedia() were added when webrtcUI.jsm merely added and removed permissions, without its own checks to short-circuit the prompt.
prompt()
in WebRTCParent.jsm now has its own early check for BLOCK
ed user permissions, making redundant most of the checks from GetUserMedia()
.
Similarly GeckoView tells clients they should expect requests even when they have previously been denied.
Changing the GetUserMedia()
code to use IsFeatureAllowed()
directly would remove the duplication, clarify the purpose of the code, and also mean the developer policy check can be performed regardless of "media.navigator.permission.disabled" while still allowing prompts to be bypassed, facilitating testing.
A comment in options.eventCallback()
in WebRTCParent.jsm can be updated for the BLOCK handling in prompt()
.
Assignee | ||
Updated•3 years ago
|
Assignee | ||
Comment 1•3 years ago
|
||
The sandbox attributes recognizes a specific set of tokens.
https://html.spec.whatwg.org/multipage/iframe-embed-object.html#attr-iframe-sandbox
Assignee | ||
Comment 2•3 years ago
|
||
Depends on D120063
Assignee | ||
Comment 3•3 years ago
|
||
"media.getusermedia.microphone.deny" and "media.getusermedia.camera.deny" now
override "media.navigator.permission.disabled".
User permission checks are removed because they are repeated in the app.
Depends on D120064
Assignee | ||
Comment 4•3 years ago
|
||
Comment 7•3 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/67c1702f50c3
https://hg.mozilla.org/mozilla-central/rev/ce3d9656ed7e
https://hg.mozilla.org/mozilla-central/rev/3c77f9f68fe8
Assignee | ||
Comment 8•3 years ago
|
||
Comment 10•3 years ago
|
||
bugherder |
Description
•