<?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>25924</bug_id>
          
          <creation_ts>2014-05-30 10:45:09 +0000</creation_ts>
          <short_desc>[Imports]: The spec. is not very specific about the edge cases of the load</short_desc>
          <delta_ts>2015-07-06 08:15:26 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebAppsWG</product>
          <component>HISTORICAL - Component Model</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>MOVED</resolution>
          
          
          <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="Gabor Krizsanits">gkrizsanits</reporter>
          <assigned_to name="Dimitri Glazkov">dglazkov</assigned_to>
          <cc>annevk</cc>
    
    <cc>brendan</cc>
    
    <cc>jonas</cc>
    
    <cc>mike</cc>
    
    <cc>morrita</cc>
    
    <cc>public-webapps</cc>
    
    <cc>zcorpan</cc>
          
          <qa_contact>public-webapps-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>107023</commentid>
    <comment_count>0</comment_count>
    <who name="Gabor Krizsanits">gkrizsanits</who>
    <bug_when>2014-05-30 10:45:09 +0000</bug_when>
    <thetext>It can be that I&apos;m overlooking something, but I don&apos;t see answers for these questions in the spec:

- what about data urls? are they allowed? and blobs?
- what about HTTP error pages? (is redirection allowed?)
- what about response other than text/html?
- should we be able to stop external resource loading for only one import (and it&apos;s subtree) or only for the whole master document?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>107024</commentid>
    <comment_count>1</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2014-05-30 10:52:05 +0000</bug_when>
    <thetext>1 and 2 should be clear from using Fetch.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>107027</commentid>
    <comment_count>2</comment_count>
    <who name="Gabor Krizsanits">gkrizsanits</who>
    <bug_when>2014-05-30 14:05:17 +0000</bug_when>
    <thetext>After talking to Anne, I think I got all my questions answered... so I&apos;m closing this for now.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>107067</commentid>
    <comment_count>3</comment_count>
    <who name="Brendan Eich">brendan</who>
    <bug_when>2014-05-31 01:14:54 +0000</bug_when>
    <thetext>It would help bug-followers to see the resolution in detail. IOW, for each hyphen-bulleted point in comment 0, a resolution item. Thanks,

/be</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>107072</commentid>
    <comment_count>4</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2014-05-31 07:02:20 +0000</bug_when>
    <thetext>We should probably actually clarify data URLs. I suspect they should not be allowed here as they would be able to execute scripts. I need to add the flag proposed by Jonas in http://lists.w3.org/Archives/Public/public-webapps/2014AprJun/0696.html and HTML imports should probably not set it.

Is the text/html requirement stated?


Brendan, as for the rest:

* blob URLs can work if they&apos;re same-origin
* redirect should be followed http://fetch.spec.whatwg.org/#atomic-http-redirect-handling
* HTTP response status should probably be ignored (we never pay attention to it)
* only text/html should be allowed (is that stated in the specification now?)
* stopping of external resource loading is up to the UA mostly (unless there&apos;s explicit API which there&apos;s not)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>107080</commentid>
    <comment_count>5</comment_count>
    <who name="Gabor Krizsanits">gkrizsanits</who>
    <bug_when>2014-05-31 14:54:45 +0000</bug_when>
    <thetext>(In reply to Anne from comment #4)
&gt; We should probably actually clarify data URLs. I suspect they should not be
&gt; allowed here as they would be able to execute scripts. I need to add the
&gt; flag proposed by Jonas in
&gt; http://lists.w3.org/Archives/Public/public-webapps/2014AprJun/0696.html and
&gt; HTML imports should probably not set it.

Why is script execution a concern exactly? I also don&apos;t quite get the example from Jonas, since data urls should only work if the redirect count is 0, no?

&gt; 
&gt; Is the text/html requirement stated?
&gt; 

It is not actually, the spec only states that the default type is text/html. I really think it should be.

One more thing that came up is if import documents fire their own load event or not.

Also the spec mentions a simple load event fired against the referring links, but I&apos;m not absolutely sure if that is a DOMContentLoaded or a Document load kind of event, in terms of when to fire. Should we wait for images for example in the import before we fire it?

(In reply to Brendan Eich from comment #3)
&gt; It would help bug-followers to see the resolution in detail. IOW, for each
&gt; hyphen-bulleted point in comment 0, a resolution item. Thanks,
&gt; 
&gt; /be

I think I closed this bug prematurely, also, this request is perfectly valid, sorry about that. And thanks Anne for doing the work for me :)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>107116</commentid>
    <comment_count>6</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2014-06-02 09:34:53 +0000</bug_when>
    <thetext>(In reply to Gabor Krizsanits from comment #5)
&gt; Why is script execution a concern exactly?

We want to restrict data URLs more. Them simply inheriting the origin of the fetching context can be somewhat dangerous. Not a 100% sure whether this applies to HTML imports, as they can effectively do the same as &lt;script&gt; which is also unprotected. Seems like http://lists.w3.org/Archives/Public/public-webapps/2014AprJun/0729.html is the larger issue here.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>107117</commentid>
    <comment_count>7</comment_count>
    <who name="Simon Pieters">zcorpan</who>
    <bug_when>2014-06-02 10:21:06 +0000</bug_when>
    <thetext>(In reply to Anne from comment #4)
&gt; * HTTP response status should probably be ignored (we never pay attention to
&gt; it)

Is that right? &lt;img&gt; ignores it but &lt;object&gt; doesn&apos;t. I don&apos;t know about other features.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>121734</commentid>
    <comment_count>8</comment_count>
    <who name="Hayato Ito">hayato</who>
    <bug_when>2015-07-06 08:15:26 +0000</bug_when>
    <thetext>Moved to https://github.com/w3c/webcomponents/issues/207</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>