DescriptionAllow CSP checkNonce and checkHash to pass with 'unsafe-inline' only.
There is a bug that a script will incorrectly not run when a nonce is
specified if 'unsafe-inline' is also specified in the policy and there's
a *second* policy that only specifies 'unsafe-inline'. This is due to a
cascading failure where the initial isAllowedByAllWithNonce check fails
because the second policy doesn't have a nonce, while the later
allowInlineScript check fails because the first policy's nonce
invalidates the 'unsafe-inline'.
This CL allows allowScriptNonce (and allowScriptHash) to pass if
'unsafe-inline' is present (and no hash or nonce is present). This also
adds tests to verify.
BUG=413482
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=181939
Patch Set 1 #Patch Set 2 : More tests #Patch Set 3 : Rebase on ToT #Patch Set 4 : Fixed broken tests #
Messages
Total messages: 15 (6 generated)
|