[CSS Font Loading] document.fonts.check / FontFaceSet.check returns 'true' for unkown fonts
Categories
(Core :: DOM: CSS Object Model, defect, P3)
Tracking
()
People
(Reporter: zhenguoou, Unassigned)
References
Details
(Whiteboard: btpp-followup-2016-03-08)
| Reporter | ||
Updated•9 years ago
|
| Reporter | ||
Comment 1•9 years ago
|
||
Comment 2•9 years ago
|
||
Comment 3•9 years ago
|
||
| Reporter | ||
Comment 4•9 years ago
|
||
| Reporter | ||
Comment 5•9 years ago
|
||
| Reporter | ||
Comment 6•9 years ago
|
||
Comment 7•9 years ago
|
||
Comment 9•6 years ago
|
||
I don't see any mention of fingerprinting in bug 1072102 (as comment 3 suggests). We should just revert the logic for now. I'll file a bug to update to follow the spec properly here since it seems other browsers don't do that either.
Updated•6 years ago
|
Comment 10•6 years ago
|
||
Ah, so I understand the problem better now. Fixing this would trivially expose the system font list to the web. That's clearly not great.
We could call into gfxPlatform, and get the actual platform name... But that probably requires some discussion and talking with the privacy and security folks first.
Updated•5 years ago
|
Comment 12•5 years ago
|
||
AFAICT, step 3 of the spec "If found faces is false, throw an XXX error and abort this algorithm" means we're supposed to throw an ("XXX"?) error here. Yes, this exposes the set of system fonts; however, as the spec notes, they're also exposed via @font-face so I'm not sure how much this matters.
Chrome returns false rather than true, so it also fails to follow the current spec text, and its behavior makes font-based fingerprinting trivial.
Safari returns true, like Firefox, which the better behavior from a privacy-protection point of view, but does not match what the spec says.
(In https://bugs.chromium.org/p/chromium/issues/detail?id=591602#c7, Tab confirms that Chrome's behavior is wrong, but the bug was later closed "WontFix".)
I've filed https://github.com/w3c/csswg-drafts/issues/5744 to propose removing the spec requirement to throw an error here.
Comment 13•4 years ago
|
||
This issue seems to be back in Firefox 92.0.1.
Try the example made by the original reporter, it will always return true.
Fails in in FF92.0.1 on Windows and MacOS.
Comment 14•4 years ago
|
||
This is the behavior required by the CSS Font Loading spec. It is specifically mentioned in the note there:
Likewise, if none of the specified fonts exist (for example, names are mis-spelled), the method also returns
true, because using this font list will not trigger any loads; instead, fallback will occur.
Description
•