<?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>25734</bug_id>
          
          <creation_ts>2014-05-15 21:16:45 +0000</creation_ts>
          <short_desc>Treat filesystem: and other (future) local-data-schemes as running script</short_desc>
          <delta_ts>2014-08-05 09:49:44 +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>Fetch</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>Unsorted</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Jonas Sicking (Not reading bugmail)">jonas</reporter>
          <assigned_to name="Anne">annevk</assigned_to>
          <cc>annevk</cc>
    
    <cc>ian</cc>
    
    <cc>mike</cc>
    
    <cc>w3c</cc>
          
          <qa_contact>sideshowbarker+fetchspec</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>106097</commentid>
    <comment_count>0</comment_count>
    <who name="Jonas Sicking (Not reading bugmail)">jonas</who>
    <bug_when>2014-05-15 21:16:45 +0000</bug_when>
    <thetext>A page inside an &lt;iframe sandbox=&quot;allow-same-origin&quot;&gt; should not be allowed to use filesystem: URLs.

Allowing reading from filesystem: would effectively allow the page to probe for data in the origin&apos;s filesystem storage and then send that information back to the server.

For example there have been CSS proposals for things like:

background: image(url(&quot;...&quot;), url(&quot;...&quot;));

If you point the first URL to a filesystem URL and the second url back to the home server, that would effectively let the home server know if a particular file exists in the user&apos;s filesystem API.

This will apply to any other data schemes that we create for loading local data, such as if we ever introduce a indexeddb:// url scheme.

So basically, from a sandboxing perspective, we should treat &quot;load from local-data-url-schemes&quot; as &quot;run scripts&quot;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>106098</commentid>
    <comment_count>1</comment_count>
    <who name="Jonas Sicking (Not reading bugmail)">jonas</who>
    <bug_when>2014-05-15 21:17:38 +0000</bug_when>
    <thetext>Sounded like Adam Barth was ok with this suggestion, though I&apos;ll let him speak for himself.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>106101</commentid>
    <comment_count>2</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2014-05-15 21:54:51 +0000</bug_when>
    <thetext>Anne, this is mostly going to be for you. Do you want me to provide a sandbox flag for this that you can hook into?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>106154</commentid>
    <comment_count>3</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2014-05-16 11:23:14 +0000</bug_when>
    <thetext>At what point does this sandboxing apply? Would these URLs just fail to parse or should fetching fail?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>106182</commentid>
    <comment_count>4</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2014-05-16 17:13:40 +0000</bug_when>
    <thetext>I think fetching. Failing to parse would be very odd... I mean, it would make the utility of the parsing API dependent on sandboxing, which is weird.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>106258</commentid>
    <comment_count>5</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2014-05-18 12:29:02 +0000</bug_when>
    <thetext>Is sandboxing part of CSP yet? Because then it could become part of the CSP check Fetch does.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>106375</commentid>
    <comment_count>6</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2014-05-19 20:00:42 +0000</bug_when>
    <thetext>Sandboxing and CSP interact cloely, but they&apos;re not part of each other per se.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>106429</commentid>
    <comment_count>7</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2014-05-20 08:50:35 +0000</bug_when>
    <thetext>K, assuming they are distinct, how should this work? http://fetch.spec.whatwg.org/#concept-fetch has a hook for HSTS and soon for CSP (open issue still). Should I add another hook for HTML sandboxing? What do you need passed?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>106492</commentid>
    <comment_count>8</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2014-05-20 17:08:26 +0000</bug_when>
    <thetext>You would just add this to the algorithm: &quot;...if the Document&apos;s active sandboxing flag set does not have the sandboxed something-or-other flag set, then...&quot;

Then tell me what &quot;something-or-other&quot; should be, and I&apos;ll add an appropriate flag. For example, &quot;sandboxed origin-privileged schemes flag&quot; or whatever.

See pointer lock for an example of a spec integrating with this.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>106545</commentid>
    <comment_count>9</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2014-05-21 08:45:32 +0000</bug_when>
    <thetext>Fetch currently only has a handle back to a global (request&apos;s client). But I guess I can get to a Document from there.

&quot;sandboxed local-data scheme flag&quot;?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>106607</commentid>
    <comment_count>10</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2014-05-21 20:07:08 +0000</bug_when>
    <thetext>data: is &quot;local data&quot; too. As is cached HTTP.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>106624</commentid>
    <comment_count>11</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2014-05-22 07:40:04 +0000</bug_when>
    <thetext>Actually, isn&apos;t this similar to &quot;sandboxed automatic features browsing context flag&quot; or &quot;sandboxed scripts browsing context flag&quot; combined with an origin check? Is there a reason to have a distinct flag for those two?

&quot;sandboxed storage area URLs flag&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>106669</commentid>
    <comment_count>12</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2014-05-22 18:18:41 +0000</bug_when>
    <thetext>&quot;sandboxed storage area URLs flag&quot; works for me.

Having more flags is essentially free from the spec point of view and gives us more flexibility later. I expect implementations to actually just have one bit for all the flags that can&apos;t be individually controlled.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>106694</commentid>
    <comment_count>13</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2014-05-23 06:56:45 +0000</bug_when>
    <thetext>Okay, sounds good. I&apos;ll add placeholder sections to Fetch for these new schemes and implement the desired sandboxing.

Where are these new schemes being defined by the way? I&apos;ve the feeling I might want to give some input to make sure they work nicely with the revamped URL parser.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>109903</commentid>
    <comment_count>14</comment_count>
    <who name="">contributor</who>
    <bug_when>2014-08-04 23:38:45 +0000</bug_when>
    <thetext>Checked in as WHATWG revision r8706.
Check-in comment: Add a sandboxing flag for use by fetch
http://html5.org/tools/web-apps-tracker?from=8705&amp;to=8706</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>109921</commentid>
    <comment_count>15</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2014-08-05 09:49:44 +0000</bug_when>
    <thetext>https://github.com/whatwg/fetch/commit/e6fa8899423652413287c0cf22cd074ffed12905</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>