Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mitigate getUserMedia/enumerateDevices fingerprinting issues based on device info permission #574

Merged

Conversation

youennf
Copy link
Contributor

@youennf youennf commented Mar 21, 2019

Introduce a device information exposure check routine that does the checks previously defined to fire the devicechange event.
Use that routine for devicechange event.
Use that routine to postpone getUserMedia and enumerateDevices steps until this routine returns true.
Sanitize constraint error if device info permission is granted.

checks previously defined to fire the devicechange event.
Use that routine for devicechange event.
Use that routine to postpone getUserMedia and enumerateDevices steps
until this routine returns true.
Copy link
Member

@jan-ivar jan-ivar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This works for us. Great improvement!

@jan-ivar
Copy link
Member

I should clarify "us" there was Firefox. We should hear from others before merging.

getusermedia.html Outdated Show resolved Hide resolved
@alvestrand
Copy link
Contributor

@guidou can you check if this (waiting with resolution until tab is foreground) is reasonable to implement in Chrome?

@guidou
Copy link
Contributor

guidou commented Mar 21, 2019

@guidou can you check if this (waiting with resolution until tab is foreground) is reasonable to implement in Chrome?

Yes, this is reasonable to implement in Chrome.

@youennf
Copy link
Contributor Author

youennf commented Mar 21, 2019

Yes, this is reasonable to implement in Chrome.

@guidou, are you saying that Chrome could always wait to reject/resolve until tab is foreground?
Or that the PR as it is is ok.

I am asking this as currently, if device permission is granted (which is I believe the case in Chrome if user granted once camera/mic permission for the origin), the PR does not require to wait.

I believe Safari (and probably Firefox) will probably wait no matter the device permission state.
If it is fine for Chrome to always wait until tab is foreground, we could simplify the PR further.

@guidou
Copy link
Contributor

guidou commented Mar 23, 2019

@youennf I meant that Chrome can be modified to wait until the tab is in the foreground. If we implement this in Chrome, it will probably also always wait until the tab is in the foreground. Thus, the PR can be simplified further.

@youennf
Copy link
Contributor Author

youennf commented Mar 25, 2019

Updated PR based on @guidou response.

@youennf
Copy link
Contributor Author

youennf commented Mar 25, 2019

Travis error is:
getusermedia.html:196:14: Warning: inserting implicit

Given this PR is not changing anything near this line, I think this is a pre-existing issue.

@alvestrand alvestrand merged commit 5959e98 into w3c:master Mar 28, 2019
moz-wptsync-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Oct 11, 2021
… a discarded document does not resolve

w3c/mediacapture-main#574

Depends on D127044

Differential Revision: https://phabricator.services.mozilla.com/D127045

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1732410
gecko-commit: 1a2b9b3d7f594cc87c6da168fcdaaed659b6e80e
gecko-reviewers: jib
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Oct 11, 2021
…Promise from a discarded document does not resolve r=jib

w3c/mediacapture-main#574

Depends on D127044

Differential Revision: https://phabricator.services.mozilla.com/D127045
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Oct 12, 2021
…romises r=jib,nika

w3c/mediacapture-main#574

Focus on browser chrome widgets is accepted provided the tab is fully active
and foreground.
w3c/mediacapture-main#752 (comment)

Differential Revision: https://phabricator.services.mozilla.com/D127051
hsivonen pushed a commit to hsivonen/gecko that referenced this pull request Oct 12, 2021
…Promise from a discarded document does not resolve r=jib

w3c/mediacapture-main#574

Depends on D127044

Differential Revision: https://phabricator.services.mozilla.com/D127045
hsivonen pushed a commit to hsivonen/gecko that referenced this pull request Oct 12, 2021
…romises r=jib,nika

w3c/mediacapture-main#574

Focus on browser chrome widgets is accepted provided the tab is fully active
and foreground.
w3c/mediacapture-main#752 (comment)

Differential Revision: https://phabricator.services.mozilla.com/D127051
jgraham pushed a commit to web-platform-tests/wpt that referenced this pull request Nov 17, 2021
… a discarded document does not resolve

w3c/mediacapture-main#574

Depends on D127044

Differential Revision: https://phabricator.services.mozilla.com/D127045

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1732410
gecko-commit: 1a2b9b3d7f594cc87c6da168fcdaaed659b6e80e
gecko-reviewers: jib
Gabisampaio pushed a commit to Gabisampaio/wpt that referenced this pull request Nov 18, 2021
… a discarded document does not resolve

w3c/mediacapture-main#574

Depends on D127044

Differential Revision: https://phabricator.services.mozilla.com/D127045

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1732410
gecko-commit: 1a2b9b3d7f594cc87c6da168fcdaaed659b6e80e
gecko-reviewers: jib
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants