<?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>11720</bug_id>
          
          <creation_ts>2011-01-10 17:15:00 +0000</creation_ts>
          <short_desc>At the moment, chrome and opera thinks that iframe with source equal to data url has *not* the same origin as parent window&apos;s document. I think that this behavior is much more useful, because it can be used as a simpliest way of sandboxing of content.</short_desc>
          <delta_ts>2011-08-04 05:34:52 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>HTML WG</product>
          <component>LC1 HTML5 spec</component>
          <version>unspecified</version>
          <rep_platform>Other</rep_platform>
          <op_sys>other</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WONTFIX</resolution>
          
          
          <bug_file_loc>http://www.whatwg.org/specs/web-apps/current-work/#sandboxOrigin</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P3</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>contributor</reporter>
          <assigned_to name="Ian &apos;Hixie&apos; Hickson">ian</assigned_to>
          <cc>annevk</cc>
    
    <cc>bzbarsky</cc>
    
    <cc>dbaron</cc>
    
    <cc>fedor</cc>
    
    <cc>ian</cc>
    
    <cc>mike</cc>
    
    <cc>mounir</cc>
    
    <cc>public-html-admin</cc>
    
    <cc>public-html-wg-issue-tracking</cc>
    
    <cc>shadow2531</cc>
    
    <cc>w3c</cc>
          
          <qa_contact name="HTML WG Bugzilla archive list">public-html-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>44003</commentid>
    <comment_count>0</comment_count>
    <who name="">contributor</who>
    <bug_when>2011-01-10 17:15:00 +0000</bug_when>
    <thetext>Specification: http://www.whatwg.org/specs/web-apps/current-work/
Section: http://www.whatwg.org/specs/web-apps/current-work/#sandboxOrigin

Comment:
At the moment, chrome and opera thinks that iframe with source equal to data
url has *not* the same origin as parent window&apos;s document. I think that this
behavior is much more useful, because it can be used as a simpliest way of
sandboxing of content.

Posted from: 2.60.105.113</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>44004</commentid>
    <comment_count>1</comment_count>
      <attachid>940</attachid>
    <who name="Fedor Indutny">fedor</who>
    <bug_when>2011-01-10 17:18:06 +0000</bug_when>
    <thetext>Created attachment 940
Testcase for browsers

As you can see - chrome and opera has no access to document cookies and window.parent, while firefox has.

I think that in this case chrome and firefox are right, b/c protocol differs and there no hostname for data-urls.

As I&apos;d said this can be used for content-sandboxing and JSONP-sandboxing (in a couple with window.postMessage() API )</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>44005</commentid>
    <comment_count>2</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2011-01-10 17:27:49 +0000</bug_when>
    <thetext>Such behavior would not be useful however for &lt;canvas&gt; and data URLs and it would be nice if it was somewhat consistent.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>44006</commentid>
    <comment_count>3</comment_count>
    <who name="Fedor Indutny">fedor</who>
    <bug_when>2011-01-10 17:32:51 +0000</bug_when>
    <thetext>Anne:
What is &quot;consistent&quot; for you in such case?
Treat them as same origin or not?

As far as I know, Opera treats those urls as not-same-origin and prevents access from inside and to outside.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>44008</commentid>
    <comment_count>4</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2011-01-10 18:07:16 +0000</bug_when>
    <thetext>Consistent would be the same, either way. And what Opera does now can change. I was just stating what I think is most useful for &lt;canvas&gt; and I think that trumps the sandboxing use case, especially as that is already addressed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>44543</commentid>
    <comment_count>5</comment_count>
    <who name="Adam Barth">w3c</who>
    <bug_when>2011-01-21 06:14:03 +0000</bug_when>
    <thetext>There&apos;s a WebKit bug on matching HTML5 and Firefox in this regard.  It&apos;s just a bit complicated so I haven&apos;t done it yet.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>45682</commentid>
    <comment_count>6</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2011-02-16 09:35:26 +0000</bug_when>
    <thetext>EDITOR&apos;S RESPONSE: This is an Editor&apos;s Response to your comment. If you are satisfied with this response, please change the state of this bug to CLOSED. If you have additional information and would like the editor to reconsider, please reopen this bug. If you would like to escalate the issue to the full HTML Working Group, please add the TrackerRequest keyword to this bug, and suggest title and text for the tracker issue; or you may create a tracker issue yourself, if you are able to do so. For more details, see this document:
   http://dev.w3.org/html5/decision-policy/decision-policy.html

Status: Rejected
Change Description: no spec change
Rationale: Since we have the srcdoc=&quot;&quot; feature now, it&apos;s not really a high priority to have data: URLs be useful for this purpose as well.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>53960</commentid>
    <comment_count>7</comment_count>
    <who name="Michael[tm] Smith">mike</who>
    <bug_when>2011-08-04 05:34:52 +0000</bug_when>
    <thetext>mass-move component to LC1</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>940</attachid>
            <date>2011-01-10 17:18:06 +0000</date>
            <delta_ts>2011-01-10 17:18:06 +0000</delta_ts>
            <desc>Testcase for browsers</desc>
            <filename>index.html</filename>
            <type>text/html</type>
            <size>244</size>
            <attacher name="Fedor Indutny">fedor</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIGh0bWw+CjxodG1sPgogIDxib2R5PgogICAgPHNjcmlwdD4KICAgICAgZG9jdW1l
bnQuY29va2llID0gJ3Rlc3QnOwogICAgPC9zY3JpcHQ+CiAgICA8aWZyYW1lIHNyYz0iZGF0YTp0
ZXh0L2h0bWw7cGxhaW4sPCFkb2N0eXBlIGh0bWw+PGh0bWw+PGJvZHk+PHNjcmlwdD5hbGVydChk
b2N1bWVudC5jb29raWUpOzwvc2NyaXB0PmhlbGxvIHdvcmxkITwvYm9keT48L2h0bWw+IiAvPgog
IDwvYm9keT4KPC9odG1sPg==
</data>

          </attachment>
      

    </bug>

</bugzilla>