Skip to content

Commit 2afde7f

Browse files
committed
Add a type and tighten the language
1 parent 2d0ba6c commit 2afde7f

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

index.bs

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ spec:SRI; urlPrefix: https://w3c.github.io/webappsec-subresource-integrity
186186
"REPORTING": {
187187
"href": "https://wicg.github.io/reporting/",
188188
"title": "Reporting API",
189-
"authors": [ "Ilya Gregorik", "Mike West" ]
189+
"authors": [ "Ilya Grigorik", "Mike West" ]
190190
},
191191
"TIMING": {
192192
"href": "https://owasp.org/www-pdf-archive/HackPra_Allstars-Browser_Timing_Attacks_-_Paul_Stone.pdf",
@@ -1089,9 +1089,11 @@ spec:SRI; urlPrefix: https://w3c.github.io/webappsec-subresource-integrity
10891089
2. If |directive| is [=`report-hash`=] and |request|'s [=request/destination=] matches
10901090
the |directive|'s [=directive/value=], then:
10911091
1. Let |hash| be the empty [=string=].
1092-
1. If |request| is CORS enabled, set |hash| to the result of [=applying algorithm to bytes=] on response's bytes and "sha-256".
1093-
1. Let |body| be a [=csp hash report body=] with the current document' URL as its [=documentURL=],
1094-
|request|'s URL as its [=subresourceURL=] and |hash| as its [=hash=].
1092+
1. If |response| is [=CORS-same-origin=], set |hash| to the result of [=applying
1093+
algorithm to bytes=] on |response|'s [=response/body=] and "sha-256".
1094+
1. Let |body| be a [=csp hash report body=] with the current document' URL as its
1095+
[=documentURL=], |request|'s URL as its [=subresourceURL=], |hash| as its
1096+
[=hash=], and "subresource" as its [=csp hash report body/type=].
10951097
1. [=Generate and queue a report=] with the following arguments:
10961098
: <var ignore>context</var>
10971099
:: <var ignore>settings object</var>
@@ -1623,7 +1625,8 @@ this algorithm returns normally if compilation is allowed, and throws a
16231625
<p>A <dfn>csp hash report body</dfn> is a [=struct=] with the following fields:
16241626
<dfn for="csp hash report body">documentURL</dfn>,
16251627
<dfn for="csp hash report body">subresourceURL</dfn>,
1626-
<dfn for="csp hash report body">hash</dfn>.
1628+
<dfn for="csp hash report body">hash</dfn>,
1629+
<dfn for="csp hash report body">type</dfn>.
16271630

16281631
<h3 id="violation-events">
16291632
Violation DOM Events

0 commit comments

Comments
 (0)