Skip to content

Commit 4275fd7

Browse files
committed
CSP 1.1: Denormify the hash mismatch warning.
We don't really want to have normative requirements for things like console messages. Changing the SHOULD to a non-normative note.
1 parent 8f19bf6 commit 4275fd7

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

csp-specification.dev.html

+6-5
Original file line numberDiff line numberDiff line change
@@ -702,18 +702,19 @@ <h5>Valid Hashes</h5>
702702
<a href="http://csrc.nist.gov/groups/STM/cavp/documents/shs/sha256-384-512.pdf">defined by the NIST</a>)
703703
</li>
704704
<li>Let <var>expected</var> be the <code>hash-value</code> component of <var>hash</var>.</li>
705-
<li>Let <var>actual</var> be the <a href="http://tools.ietf.org/html/rfc4648#section-4">base64 encoding</a> of
706-
the binary <a href="#dfn-digest-of-an-elements-contents"><var>algorithm</var> digest of <var>element</var>'s
707-
contents</a>.</li>
705+
<li>Let <var>actual</var> be the <a href="http://tools.ietf.org/html/rfc4648#section-4">base64 encoding</a>
706+
of the binary <a href="#dfn-digest-of-an-elements-contents"><var>algorithm</var> digest of <var>element</var>'s
707+
contents</a>.</li>
708708
<li>If <var>actual</var> is a case-sensitive match for
709709
<var>expected</var>, return true and abort these steps.</li>
710710
</ol>
711711
</li>
712712
<li>Return false.</li>
713713
</ol>
714714

715-
<p>If the user agent fails to match <code>hash-value</code>, the user agent SHOULD report a warning message in the developer console
716-
containing the <var>actual</var> hash value.</p>
715+
<p>Note that if an element has an invalid hash, it would be helpful
716+
if the user agent reported the failure to the author by adding
717+
a warning message containing the <var>actual</var> hash value.</p>
717718
</section>
718719

719720
<section>

0 commit comments

Comments
 (0)