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

Isn't this API a privacy issue? #63

Open
KOLANICH opened this issue Aug 21, 2019 · 11 comments
Open

Isn't this API a privacy issue? #63

KOLANICH opened this issue Aug 21, 2019 · 11 comments
Labels
privacy-tracker Group bringing to attention of Privacy, or tracked by the Privacy Group but not needing response.

Comments

@KOLANICH
Copy link

I guess the standard should prescribe the mitigations, even if they are obvious.

@bokand
Copy link
Collaborator

bokand commented Aug 21, 2019

In what sense? The API doesn't provide any information about the device so I don't think it can be used for fingerprinting.

The only new capability is that the website could detect which part of the page a user zooms into but I'm not sure that's really significant. Am I misunderstanding?

@KOLANICH
Copy link
Author

KOLANICH commented Aug 21, 2019

It is meant to provide info about screen keyboards height on mobile devices. It can be used to identify keyboard. Some keyboards have it adjustable, so it can give even more information.

@bokand
Copy link
Collaborator

bokand commented Aug 21, 2019

I guess that would depend on the implementation but, at least as it currently works on Chrome, it doesn't. The keyboard actually resizes the page so that information was already available in window.innerHeight.

Chrome did have plans to make the keyboard resize only the visual viewport - that never happened. But even in that case, this wouldn't be providing any new information that the platform wasn't already providing.

Not opposed to adding a note to implementors about this in the spec though.

@KOLANICH
Copy link
Author

But even in that case, this wouldn't be providing any new information that the platform wasn't already providing.

Could you elaborate what else API can be used to capture that info?

@bokand
Copy link
Collaborator

bokand commented Aug 21, 2019

On Android Chrome today, if you open the keyboard on a page today, you'll get a resize event [addEventListener('resize', ...)]. At that point the window.innerHeight will shrink by the size of the keyboard. So you can use innerHeight to detect the height of the keyboard already.

@KOLANICH
Copy link
Author

KOLANICH commented Aug 21, 2019

Thank you for the info, definitely need to test if this is the case for Firefox with privacy.resistFingerprinting=true.

@Thorin-Oakenpants
Copy link

Thorin-Oakenpants commented Aug 22, 2019

window.innerHeight will shrink by the size of the keyboard. So you can use innerHeight to detect the height of the keyboard already

In Firefox there is a anti-fingerprinting mechanism called letterboxing, which restricts the viewport to stepped sizes: height would typically be in 100px steps. This would "bucketize" all keyboard heights into a very few sizes heights: i.e all keyboards eating 301 to 400 pixels in height would all calculate as 400px used

Edit: this is experimental and hidden behind a pref
Edit2: this is not yet implemented in mobile

@KOLANICH
Copy link
Author

KOLANICH commented Aug 22, 2019

The important thing is how exactly is it going to be bucketed. There are 3 options, all are bad.

  1. do real letterboxing. Inacceptable - screen space is too scarce on mobiles.
  2. just round the visibleViewport sizes returned by JS to a higher value. Can be easily countermeasured - a malicious webmaster can put some essential website controls bottom to an upper bound of keyboard. Then if user's browser has lied about a keyboard, these controls will go under actual keyboard. Though it may be beneficial - these controls will likely waste screen space.
  3. just round the visibleViewport sizes returned by JS to a lower value. Then the webmaster can create opaque elements, placed to the space claimed to be screened by a keyboard, effectively transforming the situation to 1.

So, IMHO the best action here is to abolish this spec and not to implement it at all.

@karlcow
Copy link

karlcow commented Aug 23, 2019

@Thorin-Oakenpants do you have a bug reference on bugzilla for this.

@karlcow
Copy link

karlcow commented Aug 23, 2019

@KOLANICH
Copy link
Author

@dontcallmedom dontcallmedom added the privacy-tracker Group bringing to attention of Privacy, or tracked by the Privacy Group but not needing response. label May 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
privacy-tracker Group bringing to attention of Privacy, or tracked by the Privacy Group but not needing response.
Projects
None yet
Development

No branches or pull requests

5 participants