<?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>23857</bug_id>
          
          <creation_ts>2013-11-19 09:18:01 +0000</creation_ts>
          <short_desc>&quot;allowed to navigate&quot; algorithm technically blocks self navigation on sandboxed top-level browsing contexts.</short_desc>
          <delta_ts>2013-11-19 22:37:56 +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>All</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>minor</bug_severity>
          <target_milestone>Unsorted</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Bob Owen">bobowencode</reporter>
          <assigned_to name="Ian &apos;Hixie&apos; Hickson">ian</assigned_to>
          <cc>ian</cc>
    
    <cc>mike</cc>
          
          <qa_contact>contributor</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>96504</commentid>
    <comment_count>0</comment_count>
    <who name="Bob Owen">bobowencode</who>
    <bug_when>2013-11-19 09:18:01 +0000</bug_when>
    <thetext>Just noticed this minor point.

If we have a sandboxed auxiliary browsing context (opened from a sandboxed iframe with allow-popups) and it tries to navigate itself.

Following the allowed to navigate algorithm:
http://www.whatwg.org/specs/web-apps/current-work/multipage/browsers.html#allowed-to-navigate

Our browsing context is A and B, so:

1) A is same as B - move to next step.

2) B is top, but not ancestor of A - move to next step.

3) B is top, not ancestor of A, A is sandboxed and not one permitted sandboxed navigator of B - abort negatively!


The simplest fix, as far as I can see, is to add a new step at the start, which simply says &quot;If A is the same browsing context as B, then terminate positively.&quot;
Also, remove, the now redundant, first condition from the old step 1.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>96556</commentid>
    <comment_count>1</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2013-11-19 22:24:37 +0000</bug_when>
    <thetext>I made step 3 exclude the case where A=B.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>96557</commentid>
    <comment_count>2</comment_count>
    <who name="">contributor</who>
    <bug_when>2013-11-19 22:24:56 +0000</bug_when>
    <thetext>Checked in as WHATWG revision r8301.
Check-in comment: Always allow a browsing context to navigate itself.
http://html5.org/tools/web-apps-tracker?from=8300&amp;to=8301</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>96559</commentid>
    <comment_count>3</comment_count>
    <who name="Bob Owen">bobowencode</who>
    <bug_when>2013-11-19 22:37:56 +0000</bug_when>
    <thetext>(In reply to Ian &apos;Hixie&apos; Hickson from comment #1)
&gt; I made step 3 exclude the case where A=B.

That, of course, works just as well :)

Thanks Ian.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>