ContentSecurityPolicy::applyPolicySideEffectsToExecutionContext() currently doesn't distinguish <meta>-delivered policies from header-delivered policies, so in the case of a dynamically-added policy that specifies a sandbox directive, the page's origin can be updated after commit. This is weird, and according to https://www.w3.org/TR/CSP2/#delivery-html-meta-element, sandbox directives should be ignored in policies delivered via meta tags. We should strip out sandbox directives so that a page's origin can't be changed by a meta tag after commit.
Comment 1 by alex...@chromium.org
, Mar 15 2016