@@ -84839,18 +84839,43 @@ interface <dfn>BeforeUnloadEvent</dfn> : <span>Event</span> {
8483984839 </ol>
8484084840 </li>
8484184841
84842- <li><p>Let <var>xFrameOptions </var> be the result of <span
84842+ <li><p>Let <var>rawXFrameOptions </var> be the result of <span
8484384843 data-x="concept-header-list-get-decode-split">getting, decoding, and splitting</span>
8484484844 `<code>X-Frame-Options</code>` from <var>response</var>'s <span
8484584845 data-x="concept-response-header-list">header list</span>.</p></li>
8484684846
84847- <li><p>If <var>xFrameOptions</var> <span data-x="list contains">contains</span> a string that is
84848- an <span>ASCII case-insensitive</span> match for "<code data-x="">deny</code>", then return
84847+ <li><p>Let <var>xFrameOptions</var> be a new <span>set</span>.</p></li>
84848+
84849+ <li><p><span data-x="list iterate">For each</span> <var>value</var> of
84850+ <var>rawXFrameOptions</var>, <span data-x="set append">append</span> <var>value</var>,
84851+ <span>converted to ASCII lowercase</span>, to <var>xFrameOptions</var>.</p></li>
84852+
84853+ <li>
84854+ <p>If <var>xFrameOptions</var>'s <span data-x="list size">size</span> is greater than 1, and
84855+ <var>xFrameOptions</var> <span data-x="list contains">contains</span> any of "<code
84856+ data-x="">deny</code>", "<code data-x="">allowall</code>", or "<code
84857+ data-x="">sameorigin</code>", then return false.</p>
84858+
84859+ <p class="note">The intention here is to block any attempts at applying
84860+ `<code>X-Frame-Options</code>` which were trying to do something valid, but appear confused.</p>
84861+
84862+ <p class="note">This is the only impact of the legacy "<code data-x="">ALLOWALL</code>" value
84863+ on the processing model.</p>
84864+ </li>
84865+
84866+ <li>
84867+ <p>If <var>xFrameOptions</var>'s <span data-x="list size">size</span> is greater than 1, then
84868+ return true.</p>
84869+
84870+ <p class="note">This means it contains multiple invalid values, which we treat the same way as
84871+ if the header was omitted entirely.</p>
84872+ </li>
84873+
84874+ <li><p>If <var>xFrameOptions</var>[0] is "<code data-x="">deny</code>", then return
8484984875 false.</p></li>
8485084876
8485184877 <li>
84852- <p>If <var>xFrameOptions</var> <span data-x="list contains">contains</span> a string that is an
84853- <span>ASCII case-insensitive</span> match for "<code data-x="">sameorigin</code>", then:</p>
84878+ <p>If <var>xFrameOptions</var>[0] is "<code data-x="">sameorigin</code>", then:</p>
8485484879
8485584880 <ol>
8485684881 <li><p>Let <var>ancestorDocument</var> be <var>browsingContext</var>'s <span
@@ -84874,11 +84899,61 @@ interface <dfn>BeforeUnloadEvent</dfn> : <span>Event</span> {
8487484899 </ol>
8487584900 </li>
8487684901
84877- <li><p>Return true.</p></li>
84902+ <li>
84903+ <p>Return true.</p>
84904+
84905+ <p class="note">If we've reached this point then we have a lone invalid value (which could
84906+ potentially be one the legacy "<code data-x="">ALLOWALL</code>" or "<code
84907+ data-x="">ALLOW-FROM</code>" forms). These are treated as if the header were omitted
84908+ entirely.</p>
84909+ </li>
8487884910 </ol>
8487984911
8488084912 </div>
8488184913
84914+ <div class="example">
84915+ <p>The following table illustrates how various non-conformant cases involving multiple values are
84916+ processed:</p>
84917+
84918+ <table class="data">
84919+ <thead>
84920+ <tr>
84921+ <th>`<code>X-Frame-Options</code>`</th>
84922+ <th>Result</th>
84923+ </tr>
84924+ </thead>
84925+ <tbody>
84926+ <tr>
84927+ <td>`<code data-x="">SAMEORIGIN, SAMEORIGIN</code>`</td>
84928+ <td>same-origin embedding allowed</td>
84929+ </tr>
84930+ <tr>
84931+ <td>`<code data-x="">SAMEORIGIN, DENY</code>`</td>
84932+ <td>embedding disallowed</td>
84933+ </tr>
84934+ <tr>
84935+ <td>`<code data-x="">SAMEORIGIN, ALLOWALL</code>`</td>
84936+ <td>embedding disallowed</td>
84937+ </tr>
84938+ <tr>
84939+ <td>`<code data-x="">SAMEORIGIN, INVALID</code>`</td>
84940+ <td>embedding disallowed</td>
84941+ </tr>
84942+ <tr>
84943+ <td>`<code data-x="">ALLOWALL, INVALID</code>`</td>
84944+ <td>embedding disallowed</td>
84945+ </tr>
84946+ <tr>
84947+ <td>`<code data-x="">INVALID, INVALID</code>`</td>
84948+ <td>embedding allowed</td>
84949+ </tr>
84950+ </tbody>
84951+ </table>
84952+
84953+ <p>The same results are obtained whether the values are delivered in a single header, comma-delimited, or in
84954+ multiple headers.</p>
84955+ </div>
84956+
8488284957
8488384958
8488484959 <h3 split-filename="offline" id="offline">Offline web applications</h3> <!--APPCACHE-->
@@ -122277,7 +122352,7 @@ INSERT INTERFACES HERE
122277122352 <dd><cite><a href="https://tools.ietf.org/html/rfc6596">The Canonical Link Relation</a></cite>, M. Ohye, J. Kupke. IETF.</dd>
122278122353
122279122354 <dt id="refsRFC7034">[RFC7034]</dt>
122280- <dd><cite><a href="https://tools.ietf.org/html/rfc7034">HTTP Header Field X-Frame-Options</a></cite>, D. Ross, T. Gondrom. IETF.</dd>
122355+ <dd>(Non-normative) <cite><a href="https://tools.ietf.org/html/rfc7034">HTTP Header Field X-Frame-Options</a></cite>, D. Ross, T. Gondrom. IETF.</dd>
122281122356
122282122357 <dt id="refsRFC7303">[RFC7303]</dt>
122283122358 <dd><cite><a href="https://tools.ietf.org/html/rfc7303">XML Media Types</a></cite>, H. Thompson, C. Lilley. IETF.</dd>
0 commit comments