Skip to content

Commit 421299c

Browse files
Merge remote-tracking branch 'upstream/master' into sri-fail-on-no-cors
2 parents e624489 + ab46bff commit 421299c

File tree

5 files changed

+48
-44
lines changed

5 files changed

+48
-44
lines changed

specs/clear-site-data/index.html

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
<h1 class="p-name no-ref" id="title">Clear Site Data</h1>
7272

7373
<h2 class="no-num no-toc no-ref heading settled" id="subtitle"><span class="content">Editor’s Draft,
74-
<time class="dt-updated" datetime="2015-07-20">20 July 2015</time></span></h2>
74+
<time class="dt-updated" datetime="2015-07-27">27 July 2015</time></span></h2>
7575

7676
<div data-fill-with="spec-metadata">
7777
<dl>
@@ -326,7 +326,7 @@ <h4 class="heading settled" data-level="1.1.1" id="example-signout"><span class=
326326
<h4 class="heading settled" data-level="1.1.2" id="example-targeted"><span class="secno">1.1.2. </span><span class="content">Targeted Clearing</span><a class="self-link" href="#example-targeted"></a></h4>
327327

328328

329-
<p>A user signs out of Megacorp Inc.'s site via a CSRD-protected POST to
329+
<p>A user signs out of Megacorp Inc.'s site via a CSRF-protected POST to
330330
<code>https://megacorp.example.com/logout</code>. Megacorp has a large number
331331
of services available as subdomains, so many that it’s not entirely clear
332332
which of them would be safe to clear as a response to a logout action. One
@@ -1593,33 +1593,33 @@ <h3 class="no-ref no-num heading settled" id="conformance-classes"><span class="
15931593
<h2 class="no-num heading settled" id="index"><span class="content">Index</span><a class="self-link" href="#index"></a></h2>
15941594
<h3 class="no-num heading settled" id="index-defined-here"><span class="content">Terms defined by this specification</span><a class="self-link" href="#index-defined-here"></a></h3>
15951595
<ul class="indexlist">
1596-
<li>cache, <a href="#cache">2.1</a>
1597-
<li>clear(options), <a href="#dom-storagemanager-clear">2.2</a>
1598-
<li>Clear-Site-Data, <a href="#clear_site_data">2.1</a>
1599-
<li>conformant server, <a href="#conformant-server">Unnumbered section</a>
1600-
<li>conformant user agent, <a href="#conformant-user-agent">Unnumbered section</a>
1601-
<li>cookies, <a href="#cookies">2.1</a>
1602-
<li>data-type-list, <a href="#data_type_list">2.1</a>
1603-
<li>Does Not
1604-
Match, <a href="#does-not-match">3.1.3</a>
1605-
<li>domStorage, <a href="#domstorage">2.1</a>
1606-
<li>Exclude Subdomains, <a href="#exclude-subdomains">3.1.2</a>
1607-
<li>executionContexts, <a href="#executioncontexts">2.1</a>
1608-
<li>extension, <a href="#extension">2.1</a>
1609-
<li>Include Subdomains, <a href="#include-subdomains">3.1.2</a>
1596+
<li><a href="#cache">cache</a><span>, in §2.1</span>
1597+
<li><a href="#dom-storagemanager-clear">clear(options)</a><span>, in §2.2</span>
1598+
<li><a href="#clear_site_data">Clear-Site-Data</a><span>, in §2.1</span>
1599+
<li><a href="#conformant-server">conformant server</a><span>, in §Unnumbered section</span>
1600+
<li><a href="#conformant-user-agent">conformant user agent</a><span>, in §Unnumbered section</span>
1601+
<li><a href="#cookies">cookies</a><span>, in §2.1</span>
1602+
<li><a href="#data_type_list">data-type-list</a><span>, in §2.1</span>
1603+
<li><a href="#does-not-match">Does Not
1604+
Match</a><span>, in §3.1.3</span>
1605+
<li><a href="#domstorage">domStorage</a><span>, in §2.1</span>
1606+
<li><a href="#exclude-subdomains">Exclude Subdomains</a><span>, in §3.1.2</span>
1607+
<li><a href="#executioncontexts">executionContexts</a><span>, in §2.1</span>
1608+
<li><a href="#extension">extension</a><span>, in §2.1</span>
1609+
<li><a href="#include-subdomains">Include Subdomains</a><span>, in §3.1.2</span>
16101610
<li>includeSubdomains
16111611
<ul>
1612-
<li>definition of, <a href="#includesubdomains">2.1</a>
1613-
<li>dict-member for StorageClearOptions, <a href="#dom-storageclearoptions-includesubdomains">2.2</a>
1612+
<li><a href="#includesubdomains">definition of</a><span>, in §2.1</span>
1613+
<li><a href="#dom-storageclearoptions-includesubdomains">dict-member for StorageClearOptions</a><span>, in §2.2</span>
16141614
</ul>
1615-
<li>Matches, <a href="#matches">3.1.3</a>
1616-
<li>options, <a href="#dom-storagemanager-clear-options-options">2.2</a>
1617-
<li>StorageClearOptions, <a href="#dictdef-storageclearoptions">2.2</a>
1618-
<li>StorageClearType, <a href="#enumdef-storagecleartype">2.2</a>
1619-
<li>subdomain-extension, <a href="#subdomain_extension">2.1</a>
1620-
<li>type, <a href="#type">2.1</a>
1621-
<li>types, <a href="#dom-storageclearoptions-types">2.2</a>
1622-
<li>unknown-extension, <a href="#unknown_extension">2.1</a></ul>
1615+
<li><a href="#matches">Matches</a><span>, in §3.1.3</span>
1616+
<li><a href="#dom-storagemanager-clear-options-options">options</a><span>, in §2.2</span>
1617+
<li><a href="#dictdef-storageclearoptions">StorageClearOptions</a><span>, in §2.2</span>
1618+
<li><a href="#enumdef-storagecleartype">StorageClearType</a><span>, in §2.2</span>
1619+
<li><a href="#subdomain_extension">subdomain-extension</a><span>, in §2.1</span>
1620+
<li><a href="#type">type</a><span>, in §2.1</span>
1621+
<li><a href="#dom-storageclearoptions-types">types</a><span>, in §2.2</span>
1622+
<li><a href="#unknown_extension">unknown-extension</a><span>, in §2.1</span></ul>
16231623
<h3 class="no-num heading settled" id="index-defined-elsewhere"><span class="content">Terms defined by reference</span><a class="self-link" href="#index-defined-elsewhere"></a></h3>
16241624
<ul class="indexlist">
16251625
<li><a data-link-type="biblio" href="#biblio-fetch">[FETCH]</a> defines the following terms:

specs/clear-site-data/index.src.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ <h4 id="example-signout">Signing Out</h4>
198198

199199
<h4 id="example-targeted">Targeted Clearing</h4>
200200

201-
A user signs out of Megacorp Inc.'s site via a CSRD-protected POST to
201+
A user signs out of Megacorp Inc.'s site via a CSRF-protected POST to
202202
<code>https://megacorp.example.com/logout</code>. Megacorp has a large number
203203
of services available as subdomains, so many that it's not entirely clear
204204
which of them would be safe to clear as a response to a logout action. One

specs/content-security-policy/index.src.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3568,7 +3568,7 @@ <h3 id="example-policies">Sample Policy Definitions</h3>
35683568
<h3 id="example-violation-report">Sample Violation Report</h3>
35693569

35703570
This section contains an example violation report the user agent
3571-
might sent to a server when the protected resource violations a sample
3571+
might send to a server when the protected resource violates a sample
35723572
policy.
35733573

35743574
In the following example, the user agent rendered a representation

specs/subresourceintegrity/index.html

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@ <h4 id="agility">Agility</h4>
380380

381381
<p>In this case, the user agent will choose the strongest hash function in the
382382
list, and use that metadata to validate the response (as described below in
383-
the “<a href="#parse-metadata.x">parse metadata</a>” and “<a href="#get-the-strongest-metadata-from-set.x">get the strongest metadata from
383+
the “<a href="#parse-metadata">parse metadata</a>” and “<a href="#get-the-strongest-metadata-from-set">get the strongest metadata from
384384
set</a>” algorithms).</p>
385385

386386
<p>When a hash function is determined to be insecure, user agents SHOULD deprecate
@@ -424,7 +424,7 @@ <h4 id="priority">Priority</h4>
424424
<h3 id="response-verification-algorithms">Response verification algorithms</h3>
425425

426426
<section>
427-
<h4 id="apply-varalgorithmvar-to-varresponsevar">Apply <var>algorithm</var> to <var>response</var></h4>
427+
<h4 id="apply-algorithm-to-response">Apply <var>algorithm</var> to <var>response</var></h4>
428428

429429
<ol>
430430
<li>Let <var>result</var> be the result of <a href="#apply-algorithm-to-response">applying <var>algorithm</var></a>
@@ -436,11 +436,10 @@ <h4 id="apply-varalgorithmvar-to-varresponsevar">Apply <var>algorithm</var> to <
436436
<var>result</var>.</li>
437437
<li>Return <var>encodedResult</var>.</li>
438438
</ol>
439-
440439
</section>
441440
<!-- Algorithms::apply -->
442441
<section>
443-
<h4 id="is-varresponsevar-eligible-for-integrity-validation">Is <var>response</var> eligible for integrity validation</h4>
442+
<h4 id="is-response-eligible-for-integrity-validation">Is <var>response</var> eligible for integrity validation</h4>
444443

445444
<p>In order to mitigate an attacker’s ability to read data cross-origin by
446445
brute-forcing values via integrity checks, responses are only eligible for such
@@ -481,7 +480,7 @@ <h4 id="is-varresponsevar-eligible-for-integrity-validation">Is <var>response</v
481480
</section>
482481
<!-- Algorithms::eligible -->
483482
<section>
484-
<h4 id="parse-varmetadatavar">Parse <var>metadata</var>.</h4>
483+
<h4 id="parse-metadata">Parse <var>metadata</var>.</h4>
485484

486485
<p>This algorithm accepts a string, and returns either <code>no metadata</code>, or a set of
487486
valid hash expressions whose hash functions are understood by
@@ -508,7 +507,7 @@ <h4 id="parse-varmetadatavar">Parse <var>metadata</var>.</h4>
508507
</section>
509508
<!-- Algorithms::parse -->
510509
<section>
511-
<h4 id="get-the-strongest-metadata-from-varsetvar">Get the strongest metadata from <var>set</var>.</h4>
510+
<h4 id="get-the-strongest-metadata-from-set">Get the strongest metadata from <var>set</var>.</h4>
512511

513512
<ol>
514513
<li>Let <var>result</var> be the empty set and <var>strongest</var> be the empty
@@ -535,15 +534,15 @@ <h4 id="get-the-strongest-metadata-from-varsetvar">Get the strongest metadata fr
535534
</section>
536535
<!-- /Algorithms::get the strongest metadata -->
537536
<section>
538-
<h4 id="does-varresponsevar-match-varmetadatalistvar">Does <var>response</var> match <var>metadataList</var>?</h4>
537+
<h4 id="does-response-match-metadatalist">Does <var>response</var> match <var>metadataList</var>?</h4>
539538

540539
<ol>
541540
<li>Let <var>parsedMetadata</var> be the result of
542-
<a href="#parse-metadata.x">parsing <var>metadataList</var></a>.</li>
541+
<a href="#parse-metadata">parsing <var>metadataList</var></a>.</li>
543542
<li>If <var>parsedMetadata</var> is <code>no metadata</code>, return <code>true</code>.</li>
544543
<li>If <a href="#is-response-eligible-for-integrity-validation"><var>response</var> is not eligible for integrity
545544
validation</a>, return <code>false</code>.</li>
546-
<li>Let <var>metadata</var> be the result of <a href="#get-the-strongest-metadata-from-set.x">getting the strongest
545+
<li>Let <var>metadata</var> be the result of <a href="#get-the-strongest-metadata-from-set">getting the strongest
547546
metadata from <var>parsedMetadata</var></a>.</li>
548547
<li>For each <var>item</var> in <var>metadata</var>:
549548
<ol>
@@ -584,7 +583,6 @@ <h4 id="does-varresponsevar-match-varmetadatalistvar">Does <var>response</var> m
584583
validation since Subresource Integrity requires CORS, and it is a logical error
585584
to attempt to use it without CORS. Additionally, user agents SHOULD report a
586585
warning message to the developer console to explain this failure.</p>
587-
588586
</section>
589587
<!-- Algorithms::Match -->
590588
</section>

specs/subresourceintegrity/spec.markdown

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,8 @@ only to simplify the algorithm description.
301301

302302
<section>
303303
#### Apply <var>algorithm</var> to <var>response</var>
304+
{: #apply-algorithm-to-response}
305+
[apply-algorithm]: #apply-algorithm-to-response
304306

305307
1. Let <var>result</var> be the result of [applying <var>algorithm</var>][apply-algorithm]
306308
to the [representation data][representationdata] without any content-codings
@@ -310,11 +312,10 @@ only to simplify the algorithm description.
310312
2. Let <var>encodedResult</var> be result of base64-encoding
311313
<var>result</var>.
312314
3. Return <var>encodedResult</var>.
313-
314-
[apply-algorithm]: #apply-algorithm-to-response
315315
</section><!-- Algorithms::apply -->
316316
<section>
317317
#### Is <var>response</var> eligible for integrity validation
318+
{: #is-response-eligible-for-integrity-validation}
318319
[eligible]: #is-response-eligible-for-integrity-validation
319320

320321
In order to mitigate an attacker's ability to read data cross-origin by
@@ -363,6 +364,8 @@ checking because it won't have loaded successfully.
363364
</section><!-- Algorithms::eligible -->
364365
<section>
365366
#### Parse <var>metadata</var>.
367+
{: #parse-metadata}
368+
[parse]: #parse-metadata
366369

367370
This algorithm accepts a string, and returns either `no metadata`, or a set of
368371
valid hash expressions whose hash functions are understood by
@@ -385,6 +388,8 @@ the user agent.
385388
</section><!-- Algorithms::parse -->
386389
<section>
387390
#### Get the strongest metadata from <var>set</var>.
391+
{: #get-the-strongest-metadata-from-set}
392+
[get-the-strongest]: #get-the-strongest-metadata-from-set
388393

389394
1. Let <var>result</var> be the empty set and <var>strongest</var> be the empty
390395
string.
@@ -407,6 +412,8 @@ the user agent.
407412
</section><!-- /Algorithms::get the strongest metadata -->
408413
<section>
409414
#### Does <var>response</var> match <var>metadataList</var>?
415+
{: #does-response-match-metadatalist}
416+
[match]: #does-response-match-metadatalist
410417

411418
1. Let <var>parsedMetadata</var> be the result of
412419
[parsing <var>metadataList</var>][parse].
@@ -453,10 +460,6 @@ validation since Subresource Integrity requires CORS, and it is a logical error
453460
to attempt to use it without CORS. Additionally, user agents SHOULD report a
454461
warning message to the developer console to explain this failure.
455462
{:.note}
456-
457-
[parse]: #parse-metadata.x
458-
[get-the-strongest]: #get-the-strongest-metadata-from-set.x
459-
[match]: #does-response-match-metadatalist
460463
</section><!-- Algorithms::Match -->
461464
</section><!-- Algorithms -->
462465

@@ -539,6 +542,7 @@ for all possible subresources, i.e., `a`, `audio`, `embed`, `iframe`, `img`,
539542

540543
<section>
541544
#### The `integrity` attribute
545+
{: #the-integrity-attribute}
542546

543547
The `integrity` attribute represents [integrity metadata][] for an element.
544548
The value of the attribute MUST be either the empty string, or at least one
@@ -610,6 +614,7 @@ failed resource with a different one.
610614

611615
<section>
612616
###### The `link` element for stylesheets
617+
{: #the-link-element-for-stylesheets}
613618

614619
Whenever a user agent attempts to [obtain a resource][] pointed to by a
615620
`link` element that has a `rel` attribute with the keyword of `stylesheet`,
@@ -628,6 +633,7 @@ value of the element's `integrity` attribute.
628633

629634
<section>
630635
###### The `script` element
636+
{: #the-script-element}
631637

632638
Replace step 14.1 of HTML5's ["prepare a script" algorithm][prepare] with:
633639

0 commit comments

Comments
 (0)