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

enumerateDevices is exposing devices labels for origins that are granted access once #563

Closed
youennf opened this issue Jan 24, 2019 · 3 comments
Assignees

Comments

@youennf
Copy link
Contributor

youennf commented Jan 24, 2019

An origin may have had access once to getUserMedia.
In that case, the web page might have stored the list of available devices at that time including labels.
As per #559 (comment), all devices will then be exposed to that origin including labels.

This seems to include new devices for which labels were not exposed to the web page initially.
This is a leak of new information that is not really identified in the spec.

@alvestrand
Copy link
Contributor

I believe exposing labels on new devices when one has access to labels for devices was a design choice.
My opinion: Either one should have access to all device labels, or to none.

@youennf
Copy link
Contributor Author

youennf commented Jan 31, 2019

My opinion: Either one should have access to all device labels, or to none.

I tend to agree.
As an implementor, I would go with 'none', which is unfortunately not spec compliant.
The fact that labels of new devices are leaked is not pointed out in the spec.
It could lead implementors to choose 'none' instead of 'all', should the spec allow both modes.

@youennf
Copy link
Contributor Author

youennf commented Apr 11, 2019

Reading again https://w3c.github.io/permissions/#media-devices, the spec seems like an implementation decision, in particular:
The UA MAY treat result as new information about the user’s intent with respect to the "device-info" permission for this realm and other realms with the same origin, provided it doesn’t violate the previous step.

Closing.

@youennf youennf closed this as completed Apr 11, 2019
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

No branches or pull requests

3 participants