DescriptionIgnore insecure parts of CSP in extensions and allow extension to load
Previously, insecure CSP directive values caused refusal of Chrome to
load the Chrome extension. Now, insecure values are stripped from the
CSP, and a list of detailed warnings is printed at the extensions page.
Renamed ContentSecurityPolicyIsSecure to SanitizeContentSecurityPolicy
and let it return a string (the sanitized CSP) instead of a boolean
that tells whether the CSP was considered secure.
BUG=434773
R=kalman@chromium.org
R=mkwst@chromium.org
TEST=extensions_unittests=ExtensionCSPValidator.*
unit_tests=ContentSecurityPolicyManifestTest.*:PlatformAppsManifestTest:PlatformAppContentSecurityPolicy
Committed: https://crrev.com/f19335614f1a7f78b76a640aba422b13e51a2391
Cr-Commit-Position: refs/heads/master@{#310191}
Patch Set 1 #
Total comments: 10
Patch Set 2 : comments #7 #
Total comments: 1
Patch Set 3 : rebase #
Total comments: 20
Patch Set 4 : small nits #
Total comments: 5
Patch Set 5 : ContentSecurityPolicyIsSecure -> SanitizeContentSecurityPolicy + tests & nits #Patch Set 6 : rebase #Patch Set 7 : Normalize app's default CSP to match format of SanitizeContentSecurityPolicy (spaces) #Patch Set 8 : Fix test expectations #Messages
Total messages: 27 (3 generated)
|