SRI fail open on ineligible resources.
Previously, SRI failed closed if a resource was ineligible (i.e. if it's
a cross-origin request and was not a CORS request). However, for
forwards compatibility, the spec now states that ineligible resources
should fail open, with a developer console warning
(
https://github.com/w3c/webappsec/pull/394).
This is okay from a security perspective because if the reverse case
happens (a CORS request is made, but the server responds without or with
unusable CORS headers), SRI still fails closed because Fetch() will not
let it reach the integrity check. This is important because an attacker
could modify or drop the CORS headers on the server if they have
control, which is the attack vector SRI is protecting against.
BUG=
355467
R=mkwst@chromium.org
Committed:
https://src.chromium.org/viewvc/blink?view=rev&revision=196703