Dr. Neal Krawetz reported via HackerOne that it is possible to detect the platform a Tor Browser is running with the CSS line-height attribute: 19px is used on Linux, 19.5167px on macOS, and 19.2px or 20px on Windows.
We could think about adjusting that to 20px independent of the platform Tor Browser is running on.
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Child items 0
Show closed items
No child items are currently assigned. Use child items to break down this issue into smaller parts.
Linked items 0
Link issues together to show that they're related.
Learn more.
Many fonts have issues with their vertical metrics. they
are used to influence the height of ascenders and depth
of descenders. Gecko uses it to calculate the line height
(font height + ascender + descender), however because of
that idiosyncratic behavior across multiple operating
systems, it can be used to identify the user's OS.
The solution proposed in the patch([1]) is to use a default factor
to be multiplied as ascender and descender. This way all operating
systems will have the same line height.
Okay, some comments. I just tested Windows and Linux builds and it seems your fix works for me. Nice! Do you have a test which let you check your patch works correctly? If not, how have you verified your patch does indeed fix the problem?
In Tor Browser (and Mozilla in Firefox) we bind our fingerprinting resistance to the privacy.resistFingerprinting preference: only when that preference is set to true all the fingerprinting patches are active. If not then the default Firefox behavior in that regard is visible. That way it is much more easier for Mozilla to upstream our patches.
Could you make sure as well that your code is only active when this preference is set to true and inactive otherwise? Bonus points for a unit test showing that your patch does indeed do what it claims it does.
Trac: Keywords: TorBrowserTeam201709R deleted, N/Aadded Status: needs_review to needs_revision
Looks good to me and works on Linux and Windows at least. The test passes as well. I wonder, though, how future-proof the test is assuming the factor 1.2 comes from NORMAL_LINE_HEIGHT_FACTOR? Adding some folks for a second review.
Trac: Cc: igt0 to igt0, mcs, brade, pospeselr, arthuredelstein