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

Provide a means to check if the API is supported by the platform or OS #286

Open
marcoscaceres opened this issue Nov 25, 2024 · 2 comments

Comments

@marcoscaceres
Copy link
Member

marcoscaceres commented Nov 25, 2024

The current spec presumes that if the OS or user agent doesn't support a sharing capability or intent, then the API shouldn't be exposed (i.e., navigator.share() would be undefined)... the problem is that this can then be misused with other features to potentially detect a user agent type or platform.

What we should actually have is a dedicated way to check if sharing is supported. The OS/browser/user should be allowed to lie should it choose to for whatever reason (e.g., the user is allergic to share sheets).

@saschanaz
Copy link
Member

The OS/browser/user should be allowed to lie should it choose to for whatever reason (e.g., the user is allergic to share sheets).

This seems to be the real intent than the platform support indication as described by the title, is that correct? (Otherwise I'm not sure why the current behavior is insufficient, as there are easier ways to detect platforms, namely navigator.userAgent.)

Assuming that, I'm not sure such user intent should be exposed too easily, because that would be a good fingerprinting vector.

@marcoscaceres
Copy link
Member Author

Yes, exactly. It should guard against exposing any user preference (or be obscure enough that it can't be used to fingerprint).

You are correct that navigator.userAgent provides some this, but, for instance, it's shouldn't be possible to detect if you are on an iPhone or an iPad via navigator.userAgent.

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

2 participants