Platform support to let the UI know which streams are scary to share

RESOLVED FIXED in Firefox 52

Status

()

defect
P1
normal
Rank:
12
RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: florian, Assigned: jib)

Tracking

unspecified
mozilla52
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox52 fixed)

Details

Attachments

(1 attachment)

Reporter

Description

3 years ago
As part of the screensharing removal work (bug 1127522), we'll show a scary warning when the user selects a Firefox window or the whole screen in the screen sharing permission prompt, see bug 1284878.

To implement this warning in the front-end, we need the platform to expose a boolean indicating which streams are scary. This would likely be an additional readonly attribute on the nsIMediaDevice interface.
Rank: 21
Priority: -- → P2
Assignee: nobody → jib
Rank: 21 → 17
Priority: P2 → P1
Rank: 17 → 12
Comment hidden (mozreview-request)
Should be enough to get UI done. Screen is flagged as scary. Working on picking out Firefox windows from the others.

Comment 3

3 years ago
mozreview-review
Comment on attachment 8796414 [details]
Bug 1284910 - Add scary boolean to mediaDeviceInfo.

https://reviewboard.mozilla.org/r/82284/#review81120

r+ with nits

::: dom/media/webrtc/MediaEngineWebRTC.cpp:216
(Diff revision 1)
>      case dom::MediaSourceEnum::Window:
>        capEngine = mozilla::camera::WinEngine;
>        break;
>      case dom::MediaSourceEnum::Application:
>        capEngine = mozilla::camera::AppEngine;
>        break;
>      case dom::MediaSourceEnum::Screen:
>        capEngine = mozilla::camera::ScreenEngine;
> +      scaryKind = true;

Window and Application are scary too if they're a browser.  In theory even a different browser on the same machine is scary, though that's much harder to exploit.

::: dom/media/webrtc/MediaEngineWebRTC.cpp:275
(Diff revision 1)
> +    if (aMediaSource == dom::MediaSourceEnum::Window) {
> +      // TODO: Detect firefox windows
> +      //scaryWindow = true;
> +    }
> +

Please file a bug and mark here.  This does need to be solved before we get enable user approval of window/app sharing.

Also, create a similar block for Application
Attachment #8796414 - Flags: review?(rjesup) → review+
Assignee

Comment 4

3 years ago
mozreview-review-reply
Comment on attachment 8796414 [details]
Bug 1284910 - Add scary boolean to mediaDeviceInfo.

https://reviewboard.mozilla.org/r/82284/#review81120

> Window and Application are scary too if they're a browser.  In theory even a different browser on the same machine is scary, though that's much harder to exploit.

Yes will be addressed in follow-up.

> Please file a bug and mark here.  This does need to be solved before we get enable user approval of window/app sharing.
> 
> Also, create a similar block for Application

Filed bug 1311048 as follow-up.
Comment hidden (mozreview-request)
Mostly a rebase, and added similar comment block for Application.

Comment 7

3 years ago
Pushed by jbruaroey@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/8eeb8a55dc9e
Add scary boolean to mediaDeviceInfo. r=jesup

Comment 8

3 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/8eeb8a55dc9e
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla52
You need to log in before you can comment on or make changes to this bug.