<?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>28520</bug_id>
          
          <creation_ts>2015-04-20 18:42:47 +0000</creation_ts>
          <short_desc>Should the sandboxing flags be captured when setting up the refresh?</short_desc>
          <delta_ts>2016-12-20 20:54:22 +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>Other</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>MOVED</resolution>
          
          
          <bug_file_loc>https://html.spec.whatwg.org/#table-http-equiv</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P3</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>Unsorted</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>d</cc>
    
    <cc>mike</cc>
    
    <cc>mkwst</cc>
          
          <qa_contact>contributor</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>119698</commentid>
    <comment_count>0</comment_count>
    <who name="">contributor</who>
    <bug_when>2015-04-20 18:42:47 +0000</bug_when>
    <thetext>Specification: https://html.spec.whatwg.org/multipage/semantics.html
Multipage: https://html.spec.whatwg.org/multipage/#table-http-equiv
Complete: https://html.spec.whatwg.org/#table-http-equiv
Referrer: https://html.spec.whatwg.org/multipage/

Comment:
Should the sandboxing flags be captured when setting up the refresh?

Posted from: 98.110.194.132
User agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:40.0) Gecko/20100101 Firefox/40.0</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>119699</commentid>
    <comment_count>1</comment_count>
    <who name="Boris Zbarsky">bzbarsky</who>
    <bug_when>2015-04-20 18:44:14 +0000</bug_when>
    <thetext>In particular, if the &lt;meta&gt; is adopted into a different document the allow-scripts flag on its node document can effectively change between when https://html.spec.whatwg.org/multipage/semantics.html#attr-meta-http-equiv-refresh starts running and when the refresh comes due.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>119700</commentid>
    <comment_count>2</comment_count>
    <who name="Boris Zbarsky">bzbarsky</who>
    <bug_when>2015-04-20 19:22:49 +0000</bug_when>
    <thetext>A quick test shows that Chrome, at least, does not wait for the refresh to come due before checking the sandbox flags.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>125785</commentid>
    <comment_count>3</comment_count>
    <who name="Domenic Denicola">d</who>
    <bug_when>2016-04-08 23:31:16 +0000</bug_when>
    <thetext>Mike, could you check the current spec here to see if it aligns with your intentions, per Boris&apos;s question? That is, I&apos;d love to pass this issue off to you instead of having to try to understand it myself :).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>128311</commentid>
    <comment_count>4</comment_count>
    <who name="Domenic Denicola">d</who>
    <bug_when>2016-12-13 14:05:20 +0000</bug_when>
    <thetext>Going through older issues...

This is actually pretty easy to understand. Boris, what did you end up implementing in Gecko? If it matches Blink per comment #2, we should just update the spec. Did you write tests for the edge case in question that we can use to solidify a spec change?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>128317</commentid>
    <comment_count>5</comment_count>
    <who name="Boris Zbarsky">bzbarsky</who>
    <bug_when>2016-12-13 14:15:48 +0000</bug_when>
    <thetext>Gecko&apos;s implementation is quite different from the spec&apos;s in various ways (e.g. we handle meta refresh in the parser only, not on general &lt;meta&gt; addition to the DOM), but we do check the sandbox flag up front before doing any work at all.  In terms of the spec algorithm, it&apos;s the equivalent of doing it before step 2 of https://html.spec.whatwg.org/multipage/semantics.html#attr-meta-http-equiv-refresh for sure, in that we do it before we even get the value of the &quot;content&quot; attribute.

It&apos;s worth checking what other UAs do around this stuff, including whether they actually implement this as an action on element insertion.

It doesn&apos;t look like we wrote tests for the edge case.  See https://bug1156059.bmoattachments.org/attachment.cgi?id=8598598 for the tests we did write (which aren&apos;t even web platform tests, sadly).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>128337</commentid>
    <comment_count>6</comment_count>
    <who name="Domenic Denicola">d</who>
    <bug_when>2016-12-20 20:54:22 +0000</bug_when>
    <thetext>https://github.com/whatwg/html/pull/2198</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>