<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>53435</bug_id>
          
          <creation_ts>2011-01-31 10:08:14 -0800</creation_ts>
          <short_desc>WOFF fonts loaded through @font-face should have Same Origin Restrictions</short_desc>
          <delta_ts>2020-01-08 18:25:02 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Text</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>86817</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Tab Atkins">tabatkins</reporter>
          <assigned_to name="Myles C. Maxfield">mmaxfield</assigned_to>
          <cc>abarth</cc>
    
    <cc>ap</cc>
    
    <cc>eoconnor</cc>
    
    <cc>fred.wang</cc>
    
    <cc>mitz</cc>
    
    <cc>mjs</cc>
    
    <cc>mmaxfield</cc>
    
    <cc>sam</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>tabatkins</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>342638</commentid>
    <comment_count>0</comment_count>
    <who name="Tab Atkins">tabatkins</who>
    <bug_when>2011-01-31 10:08:14 -0800</bug_when>
    <thetext>Per the WOFF spec at &lt;http://www.w3.org/TR/WOFF/&gt;, UAs supporting WOFF must apply same-origin restrictions to the file.  Currently, we allow WOFF to be served from any origin.

Firefox 4 and IE9 will ship with SOR on WOFF fonts.

CORS should be usable to defeat the restriction when necessary, such as with font-serving services.  Google&apos;s font api currently sends CORS headers allowing usage on any origin.

(This is also filed as &lt;http://code.google.com/p/chromium/issues/detail?id=71423&gt;.)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>342763</commentid>
    <comment_count>1</comment_count>
    <who name="Maciej Stachowiak">mjs</who>
    <bug_when>2011-01-31 12:49:43 -0800</bug_when>
    <thetext>Per mailing list discussion, I think we should not do this. Mailing list discussion here:

https://lists.webkit.org/pipermail/webkit-dev/2011-January/015790.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>342784</commentid>
    <comment_count>2</comment_count>
    <who name="Tab Atkins">tabatkins</who>
    <bug_when>2011-01-31 13:25:23 -0800</bug_when>
    <thetext>Right.  Per IRC conversation, the major problem seems to be a spec one.  If you only apply SOR to WOFF fonts and not others, then you can&apos;t tell ahead of time that you need to make a CORS request.  There are then some architectural issues surrounding exactly how you&apos;re supposed to handle CORS if you have to request the resource first.

Firefox (and presumably IE9) don&apos;t have this issue, as they just apply SOR to everything piped through @font-face.  This would also be an acceptable solution, but in IRC discussion you seemed resistant to this as well (I didn&apos;t press on that issue as I didn&apos;t have time).  I don&apos;t see anything particularly wrong with this.  Could you elaborate on your objections in this vein?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>342810</commentid>
    <comment_count>3</comment_count>
    <who name="Tab Atkins">tabatkins</who>
    <bug_when>2011-01-31 14:21:53 -0800</bug_when>
    <thetext>I just got confirmation that IE9 is indeed applying SOR to all @font-face resources, using Simple Requests &lt;http://www.w3.org/TR/cors/#resource-requests&gt;.  They even do it for EOT - they expect some minor breakage, but nearly all cross-origin font loads on the web so far are from font libraries, which are either already serving CORS headers, or only serve EOT to IE&lt;9.

If both Firefox and IE consider the public-web breakage to be minimal enough to do SOR on all font requests, I don&apos;t see any reason we should disagree, given that they both have larger marketshare and thus more reason to break.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>342817</commentid>
    <comment_count>4</comment_count>
    <who name="Maciej Stachowiak">mjs</who>
    <bug_when>2011-01-31 14:34:17 -0800</bug_when>
    <thetext>(In reply to comment #2)
&gt; Right.  Per IRC conversation, the major problem seems to be a spec one.  If you only apply SOR to WOFF fonts and not others, then you can&apos;t tell ahead of time that you need to make a CORS request.  There are then some architectural issues surrounding exactly how you&apos;re supposed to handle CORS if you have to request the resource first.
&gt; 
&gt; Firefox (and presumably IE9) don&apos;t have this issue, as they just apply SOR to everything piped through @font-face.  This would also be an acceptable solution, but in IRC discussion you seemed resistant to this as well (I didn&apos;t press on that issue as I didn&apos;t have time).  I don&apos;t see anything particularly wrong with this.  Could you elaborate on your objections in this vein?

It would be a regression in our existing @font-face support for TrueType, OpenType and SVG fonts.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>342821</commentid>
    <comment_count>5</comment_count>
    <who name="Tab Atkins">tabatkins</who>
    <bug_when>2011-01-31 14:40:08 -0800</bug_when>
    <thetext>&quot;A regression&quot; isn&apos;t sufficient.  If it&apos;s an insignificant regression, then we don&apos;t have to worry about it.  As I said, IE9 and FF are already doing this, as they don&apos;t consider the potential breakage large enough to worry about.

Do you have evidence of significant breakage that would be caused by applying SOR to all fonts?  If it&apos;s public breakage, Moz and MS would surely be interested in hearing about it as well.  If it&apos;s private breakage, we can hopefully fix it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>342963</commentid>
    <comment_count>6</comment_count>
    <who name="Sam Weinig">sam</who>
    <bug_when>2011-01-31 18:59:23 -0800</bug_when>
    <thetext>What is the benefit to users of doing this?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>344233</commentid>
    <comment_count>7</comment_count>
    <who name="Adam Barth">abarth</who>
    <bug_when>2011-02-02 14:04:52 -0800</bug_when>
    <thetext>Here are some thoughts on this topic from annevk:

http://annevankesteren.nl/2011/02/web-platform-consistency</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1604456</commentid>
    <comment_count>8</comment_count>
    <who name="Myles C. Maxfield">mmaxfield</who>
    <bug_when>2020-01-08 18:25:02 -0800</bug_when>
    <thetext>WOFF isn&apos;t special. Marking as a duplicate of https://bugs.webkit.org/show_bug.cgi?id=86817

*** This bug has been marked as a duplicate of bug 86817 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>