Content-Security-Policy header "disappears" after Save-Page-As |
|||||
Issue descriptionRight now HTML serializers in Blink (the one for MHTML and the one for HTML) do not persist Content-Security-Policy header from http headers. Is that a problem? (i.e. content that used to be blocked by CSP when looking at a page via http will no longer be blocked after saving the page and opening it via file: scheme - is that okay [given that the origin of the page is different from what it was originally / via http]?) Note that there is a (single...) precedent where HTML serializers preserve some <meta http-equiv ...> tags - ones for character encoding. Potentially something similar could be done for Content-Security-Policy.
,
Mar 16 2016
I can take this until it's fixed. the plan so far is to block certain types of access from mhtml-loaded document. See bug 586034 for more details.
,
Mar 16 2016
,
Mar 23 2016
,
Sep 27 2016
THis works as intended. The CSP headers are used during load and resulting DOM reflects that. The MHTML snapshot is a static 'printout' of the page and does not re-interpret nor loads additional resources when loaded.
,
Sep 29 2016
dimich@: This is fine as long as the MHTML file is neutered and inert. If/when you plan to revitalize MHTML by giving it an origin and allowing script execution, you'll need to persist the security headers like CSP that govern script execution. |
|||||
►
Sign in to add a comment |
|||||
Comment 1 by lukasza@chromium.org
, Mar 16 2016