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

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>17461</bug_id>
          
          <creation_ts>2012-06-11 10:41:00 +0000</creation_ts>
          <short_desc>CORS-enabled fetch supports javascript: and about:blank</short_desc>
          <delta_ts>2013-04-09 18:18:25 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WHATWG</product>
          <component>HTML</component>
          <version>unspecified</version>
          <rep_platform>Other</rep_platform>
          <op_sys>other</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WORKSFORME</resolution>
          
          
          <bug_file_loc>http://www.whatwg.org/specs/web-apps/current-work/#potentially-cors-enabled-fetch</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P3</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>Unsorted</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>contributor</reporter>
          <assigned_to name="Ian &apos;Hixie&apos; Hickson">ian</assigned_to>
          <cc>annevk</cc>
    
    <cc>ian</cc>
    
    <cc>mathias</cc>
    
    <cc>mike</cc>
    
    <cc>zcorpan</cc>
          
          <qa_contact>contributor</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>68910</commentid>
    <comment_count>0</comment_count>
    <who name="">contributor</who>
    <bug_when>2012-06-11 10:41:00 +0000</bug_when>
    <thetext>Specification: http://www.whatwg.org/specs/web-apps/current-work/multipage/fetching-resources.html
Multipage: http://www.whatwg.org/C#potentially-cors-enabled-fetch
Complete: http://www.whatwg.org/c#potentially-cors-enabled-fetch

Comment:
&lt;track&gt; data: URLs should be supported

Posted from: 2001:4c28:a030:30:450a:b4aa:b818:bf52 by simonp@opera.com
User agent: Opera/9.80 (Macintosh; Intel Mac OS X 10.7.3; U; en) Presto/2.10.229 Version/11.64</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>68911</commentid>
    <comment_count>1</comment_count>
    <who name="Simon Pieters">zcorpan</who>
    <bug_when>2012-06-11 10:45:59 +0000</bug_when>
    <thetext>Using &lt;track src=&quot;data:....&quot;&gt; currently seems to fail at the &quot;resource sharing check&quot; since there&apos;s no Access-Control-Allow-Origin header.

To make data: URLs function like same-origin for &lt;track&gt;, I think the potentially CORS-enabled fetch algorithm should have an entry point as &quot;If URL is a data: URL&quot; at the top, and then skip the resource sharing check if URL is a data: URL and instead just set result to success.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>71056</commentid>
    <comment_count>2</comment_count>
    <who name="">contributor</who>
    <bug_when>2012-07-18 17:59:49 +0000</bug_when>
    <thetext>This bug was cloned to create bug 18295 as part of operation convergence.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>72998</commentid>
    <comment_count>3</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2012-08-29 20:27:45 +0000</bug_when>
    <thetext>I&apos;ve added data:, javascript:, and about:blank. For the current uses of the algorithm, I&apos;m 80% sure this is safe in all cases. We&apos;d better be careful with future uses of this algorithm though.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>73050</commentid>
    <comment_count>4</comment_count>
    <who name="Simon Pieters">zcorpan</who>
    <bug_when>2012-08-30 06:58:30 +0000</bug_when>
    <thetext>javascript: shouldn&apos;t be supported generally. Opera deliberately only supports it where it is needed for compat. I don&apos;t know for sure what the full list is right now, but &lt;a href&gt;, &lt;area href&gt;, &lt;form action&gt;, &lt;iframe src&gt; and &lt;frame src&gt; are allowed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>73052</commentid>
    <comment_count>5</comment_count>
    <who name="Simon Pieters">zcorpan</who>
    <bug_when>2012-08-30 08:45:05 +0000</bug_when>
    <thetext>So Opera supports javascript: in browsing contexts and in navigations of browsing contexts. &lt;object src=javascript:&gt; is not supported because it&apos;s not a browsing context when the fetch happens. However an &lt;object&gt; that is a browsing context can probably navigate to a javascript: URL.

Additionally, I&apos;m not sure about:blank should be supported here. I think it makes more sense for each thing that uses CORS-enabled fetch and wants to support about:blank to special-case it. (Currently it seems useless for everything that uses CORS-enabled fetch.)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>73635</commentid>
    <comment_count>6</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2012-09-11 22:07:03 +0000</bug_when>
    <thetext>I don&apos;t see much point in not supporting javascript: and about:blank in these cases.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>73700</commentid>
    <comment_count>7</comment_count>
    <who name="Simon Pieters">zcorpan</who>
    <bug_when>2012-09-12 16:16:09 +0000</bug_when>
    <thetext>We want to limit javascript: as to not increase sites&apos; attack surface. As for about:blank, what&apos;s the use case?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>74715</commentid>
    <comment_count>8</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2012-09-28 03:51:25 +0000</bug_when>
    <thetext>How does javascript: increase attack surface?

about:blank is there just for consistency. The three groups of URLs are treated similarly throughout.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>74762</commentid>
    <comment_count>9</comment_count>
    <who name="Simon Pieters">zcorpan</who>
    <bug_when>2012-09-28 08:46:53 +0000</bug_when>
    <thetext>Sites that use blacklist-based content filtering get increased attack surface when browsers execute scripts in new places.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>74833</commentid>
    <comment_count>10</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2012-09-28 19:52:06 +0000</bug_when>
    <thetext>Sites that use blacklist-based security are doomed. It&apos;s dumb for us to try to help them. It just makes them feel safer than they are.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>80210</commentid>
    <comment_count>11</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2012-12-14 22:36:58 +0000</bug_when>
    <thetext>When I looked at this my conclusion was that javascript: should be done during navigation. The others should be supported by fetching, but not after redirects. See also: http://wiki.whatwg.org/wiki/URL#Schemes</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>83112</commentid>
    <comment_count>12</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2013-02-13 18:12:47 +0000</bug_when>
    <thetext>Ok, for javascript: let&apos;s move this to bug 20990. That&apos;s the only thing left that people want changing for &lt;track&gt;, right? So we can close this bug?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>85814</commentid>
    <comment_count>13</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2013-04-09 18:18:25 +0000</bug_when>
    <thetext>See comment 12.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>