<?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>12393</bug_id>
          
          <creation_ts>2011-03-29 07:12:54 +0000</creation_ts>
          <short_desc>Add &quot;allow-popups&quot; for iframe@sandbox</short_desc>
          <delta_ts>2012-04-20 05:20:11 +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>PC</rep_platform>
          <op_sys>Windows NT</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc>http://dev.w3.org/html5/spec/Overview.html#attr-iframe-sandbox</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>WGDecision</keywords>
          <priority>P2</priority>
          <bug_severity>blocker</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>15837</dependson>
          <blocked>15236</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Jacob Rossi [MSFT]">jrossi</reporter>
          <assigned_to name="Ian &apos;Hixie&apos; Hickson">ian</assigned_to>
          <cc>adrianba</cc>
    
    <cc>ian</cc>
    
    <cc>julian.reschke</cc>
    
    <cc>mike</cc>
    
    <cc>public-html-admin</cc>
    
    <cc>public-html-wg-issue-tracking</cc>
    
    <cc>rubys</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>47023</commentid>
    <comment_count>0</comment_count>
    <who name="Jacob Rossi [MSFT]">jrossi</who>
    <bug_when>2011-03-29 07:12:54 +0000</bug_when>
    <thetext>There&apos;s currently no way for a sandboxed iframe to generate popups (which for some mashup scenarios, may be valid). We should add an &quot;allow-popups&quot; token for the sandbox attribute.

When set, window.open(), showModalDialog() [1], and links with target=_blank would be allowed. However, the newly created browsing contexts should inherit the sandbox restrictions of the context from which the popup was created.

[1] http://www.w3.org/Bugs/Public/show_bug.cgi?id=12391</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>47035</commentid>
    <comment_count>1</comment_count>
    <who name="Adam Barth">w3c</who>
    <bug_when>2011-03-29 17:15:24 +0000</bug_when>
    <thetext>Makes sense to me.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>49529</commentid>
    <comment_count>2</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2011-06-13 22:17:10 +0000</bug_when>
    <thetext>target=&quot;_blank&quot; works fine, as far as I can tell, even in sandboxed iframes.

What&apos;s the use case for sandbox content being allowed to script pop-ups?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>49533</commentid>
    <comment_count>3</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2011-06-13 22:28:38 +0000</bug_when>
    <thetext>(by &quot;works fine&quot;, I mean that the UA has the option of letting the user indicate that the link should work normally)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>49618</commentid>
    <comment_count>4</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2011-06-15 06:16:01 +0000</bug_when>
    <thetext>Without a clear understanding of the use cases, I think we&apos;re better off delaying this until this feature is better understood. In particular, the idea of having sandboxing flags on a top-level browsing context is somewhat scary.

Marking LATER for now; I&apos;ll reopen this when sandbox=&quot;&quot; is more widely implemented.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>50954</commentid>
    <comment_count>5</comment_count>
    <who name="Jacob Rossi [MSFT]">jrossi</who>
    <bug_when>2011-07-12 23:44:09 +0000</bug_when>
    <thetext>Reopening this as sandbox=&quot;&quot; is now more widely implemented (IE10 Platform Preview 2). :-)

IE10 PPB2 includes a vendor prefixed implementation of allow-popups. Here&apos;s one good use case:

A site sandboxes a maps widget. The maps widget offers options to launch a popup for a larger map or for finding directions.

By default in both Chrome and IE10, the popups are blocked. Using allow-popups enables the control to work as expected while still sandboxing the widget in the other ways.

Demo: http://ie.microsoft.com/testdrive/HTML5/sandbox/Default.html (click Controlling Popups)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>53400</commentid>
    <comment_count>6</comment_count>
    <who name="Michael[tm] Smith">mike</who>
    <bug_when>2011-08-04 05:13:29 +0000</bug_when>
    <thetext>mass-move component to LC1</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>54870</commentid>
    <comment_count>7</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2011-08-13 05:02:40 +0000</bug_when>
    <thetext>IE10 hasn&apos;t even shipped, so that really doesn&apos;t count as &quot;widely implemented&quot; yet! I meant when it&apos;s widely-enough implemented that people are able to rely on it at all.

The experience with IE10 will be helpful in informing the specification. It&apos;ll be interesting to see how people use the feature.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>57730</commentid>
    <comment_count>8</comment_count>
    <who name="Adrian Bateman [MSFT]">adrianba</who>
    <bug_when>2011-10-03 23:09:10 +0000</bug_when>
    <thetext>Created ISSUE-180.
http://www.w3.org/html/wg/tracker/issues/180</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>59538</commentid>
    <comment_count>9</comment_count>
    <who name="Adam Barth">w3c</who>
    <bug_when>2011-11-03 00:53:05 +0000</bug_when>
    <thetext>https://bugs.webkit.org/show_bug.cgi?id=66505</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>59807</commentid>
    <comment_count>10</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2011-11-09 23:33:22 +0000</bug_when>
    <thetext>Reopening based on existence of multiple implementations.

See also specifically this comment: https://bugs.webkit.org/show_bug.cgi?id=66505#c1</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>59809</commentid>
    <comment_count>11</comment_count>
    <who name="Adam Barth">w3c</who>
    <bug_when>2011-11-09 23:50:08 +0000</bug_when>
    <thetext>Another subtly is whether the sandbox flags get applied to the main frame of the popup or to the document (i.e., whether subsequent documents that inhabit the frame are sandboxed).  WebKit applies the sandbox bits to the frame so that future documents in that frame also are sandboxed.

If the user navigates via the browser&apos;s location bar, the bits a cleared because the new document is loaded into a &quot;new&quot; frame.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>59811</commentid>
    <comment_count>12</comment_count>
    <who name="Jacob Rossi [MSFT]">jrossi</who>
    <bug_when>2011-11-10 01:22:18 +0000</bug_when>
    <thetext>(In reply to comment #11)
&gt; Another subtly is whether the sandbox flags get applied to the main frame of
&gt; the popup or to the document (i.e., whether subsequent documents that inhabit
&gt; the frame are sandboxed).  WebKit applies the sandbox bits to the frame so that
&gt; future documents in that frame also are sandboxed.
&gt; 
&gt; If the user navigates via the browser&apos;s location bar, the bits a cleared
&gt; because the new document is loaded into a &quot;new&quot; frame.

IE10 follows a similar design.  Navigations from within the page with CSP (clicking a link, window.location=foo, window.open(foo,&quot;_self&quot;), etc.)  persist the restrictions.  However, if the user navigates with the address bar then the sandbox bits are cleared.

Child frames within a document with a CSP sandbox header also inherit those restrictions (in the same way a child frame of a sandboxed iframe inherit sandbox flags per HTML5).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>59812</commentid>
    <comment_count>13</comment_count>
    <who name="Adam Barth">w3c</who>
    <bug_when>2011-11-10 01:46:31 +0000</bug_when>
    <thetext>That&apos;s slightly different from the discussion in public-web-security about CSP.  IMHO, we should tackle the CSP issues separately.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>59813</commentid>
    <comment_count>14</comment_count>
    <who name="Jacob Rossi [MSFT]">jrossi</who>
    <bug_when>2011-11-10 01:49:47 +0000</bug_when>
    <thetext>(In reply to comment #13)
&gt; That&apos;s slightly different from the discussion in public-web-security about CSP.
&gt;  IMHO, we should tackle the CSP issues separately.

Ack.  I was still thinking about CSP when I wrote this--didn&apos;t mean to mix.  My comment also applies to popups created from a sandboxed frame:

The popup inherits the same restrictions.  Navigations from within the page continue to have the sandbox restrictions.  User navigations from the address bar clear the restrictions.

Child frames within the popups also inherit the sandbox restrictions (same way as child frames in the sandbox iframe).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>59842</commentid>
    <comment_count>15</comment_count>
    <who name="Sam Ruby">rubys</who>
    <bug_when>2011-11-10 19:22:11 +0000</bug_when>
    <thetext>At the present time, we have a single change proposal:

http://www.w3.org/html/wg/wiki/ChangeProposals/sandbox_allow_popups

This change proposal is not to be applied until and unless we determine that there is consensus on this proposal.

If anyone in the working group disagrees with that proposal, we request that they submit an Alternate or Counter Proposal by December 10, 2011:

http://lists.w3.org/Archives/Public/public-html/2011Nov/0077.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>63099</commentid>
    <comment_count>16</comment_count>
    <who name="Sam Ruby">rubys</who>
    <bug_when>2012-01-25 15:04:02 +0000</bug_when>
    <thetext>WG Decision: 

  http://lists.w3.org/Archives/Public/public-html/2012Jan/0130.html

Change Proposal: 

  http://www.w3.org/html/wg/wiki/ChangeProposals/sandbox_allow_popups</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>63489</commentid>
    <comment_count>17</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2012-02-01 00:19:14 +0000</bug_when>
    <thetext>*** Bug 15236 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>66757</commentid>
    <comment_count>18</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2012-04-17 05:04:54 +0000</bug_when>
    <thetext>Done (with some minor tweaks — one based on discussions with Adrian on IM, to still allow UAs to have UI that overrides sandboxing; some minor tweaks to how the speccing works to work in the framework we have post-CSP refactoring; and a tweak to handle one place that the CP forgot to fix, namely the navigation algorithm).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>66884</commentid>
    <comment_count>19</comment_count>
    <who name="Sam Ruby">rubys</who>
    <bug_when>2012-04-20 03:24:34 +0000</bug_when>
    <thetext>http://html5.org/tools/web-apps-tracker?from=7053&amp;to=7054</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>