12 points · by jdorfman · 13y ago · 18 comments
Note that IE also applies same-origin restrictions to web fonts, and in fact this is required by the CSS Fonts standard [1], although this has been a somewhat contentious part of the spec [2]. The Blink team has discussed implementing this part of the spec too; Google's Tab Atkins believes that any new resource linking mechanism added to the web platform should be subject to same-origin restrictions by default [3] because this gives the platform better security characteristics.
The publisher of a web font can enable cross-origin use in all browsers by sending CORS headers [4].
[1] http://www.w3.org/TR/css-fonts-3/#same-origin-restriction
[2] http://lists.w3.org/Archives/Public/www-style/2011Jun/thread...
[3] https://groups.google.com/a/chromium.org/d/msg/blink-dev/TT9...
[4] https://developer.mozilla.org/en-US/docs/HTTP/Access_control...
"The publisher of a web font can enable cross-origin use in all browsers by sending CORS headers."
I agree they can, but why do we need to add "Access-Control-Allow-Origin" header? What is the security risk? I am not being facetious, I really want to know.
Edit: I see you added more to your comment now.
There are a few reasons to require CORS for cross-domain font loads. One is so that you can use fonts that have single-site licenses in a way that satisfies the licensor, by not allowing other sites to use the font too without your authorization. Another is to prevent unintended data leaks where a malicious site can deduce things about a user based on whether that user can load a font from a different site, or based on the contents of that font. This isn't about a known attack, but a class of attack that we know from experience is likely to crop up in the future for any type of cross-origin resource load that we allow.
Good point but I believe that the only way to combat that particular edge-case is to use something like the valid_referers directive: https://gist.github.com/jdorfman/6737413
"This isn't about a known attack, but a class of attack that we know from experience is likely to crop up in the future for any type of cross-origin resource load that we allow."
You bring up another good point, but I am not talking about every cross-origin resource here, I am talking about Content-Type: font/ttf, application/x-woff, application/vnd.ms-fontobject & image/svg+xml.
I don't expect Microsoft to listen to their customers/users. I used to think Mozilla did but apparently not.
Many (but not all) of us believe that same-origin by default is also the right thing for security, that it should be the default for new types of resource linking on the Web, and that not having same origin restrictions for things like images was a pretty serious mistake that we're still paying the security costs of (for example, with canvas image tainting).
You can use fonts from places that let you use them. But this offers both a minimal copy/hot link protection, so that I can't just steal a font from somewhere, or use someone else's hosted font unless they let me.
I don't think Firefox should "fix" this as it seems to be a good decision for preventing all sorts of bad things.
Also, do you want to load the fonts across domains so they can be hosted on CDNs?
Also, this is a terrible, non-descriptive title.
or i am just paranoid.
all they want is that FF and IE be as permissive as Chrome so they can track everyone via cross-domain font requests. As they already do with DNS and free CDN for js libs.