|
[HTML Import] Respect Content Security Policy Model
See https://www.w3.org/Bugs/Public/show_bug.cgi?id=22752 for the expected behavior.
This change teaches DocumentInit about Imports:
- The security context of the imported document should be master's context (frame).
- Each imported document should have its own CSP. It is enforced by the HTTP header
which it is served with, for example.
This change also teaches CachedResourceLoader about Imports. That is,
imports should be loaded as if it is a script in terms of CSP.
This change doesn't cover scripting on imported documents since it is yet to be implemented.
We should test CSP cases when we implemented the scripting.
BUG= 240592
TEST=http/tests/htmlimports/csp-*.html
R=abarth,dglazkov
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=154924
Total comments: 5
Total comments: 4
Total comments: 2
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+304 lines, -51 lines) |
Patch |
|
A |
LayoutTests/http/tests/htmlimports/csp-block-import.html
|
View
|
|
1 chunk |
+19 lines, -0 lines |
0 comments
|
Download
|
|
A |
LayoutTests/http/tests/htmlimports/csp-block-import-expected.txt
|
View
|
|
1 chunk |
+4 lines, -0 lines |
0 comments
|
Download
|
|
A |
LayoutTests/http/tests/htmlimports/csp-block-import-non-self.html
|
View
|
|
1 chunk |
+25 lines, -0 lines |
0 comments
|
Download
|
|
A |
LayoutTests/http/tests/htmlimports/csp-block-import-non-self-expected.txt
|
View
|
|
1 chunk |
+5 lines, -0 lines |
0 comments
|
Download
|
|
A |
LayoutTests/http/tests/htmlimports/csp-in-imports.html
|
View
|
1
2
3
4
5
|
1 chunk |
+25 lines, -0 lines |
0 comments
|
Download
|
|
A + |
LayoutTests/http/tests/htmlimports/csp-in-imports-expected.txt
|
View
|
1
2
3
4
5
|
0 chunks |
+-1 lines, --1 lines |
0 comments
|
Download
|
|
A |
LayoutTests/http/tests/htmlimports/csp-not-block-import-in-import.html
|
View
|
1
2
3
4
5
6
|
1 chunk |
+19 lines, -0 lines |
0 comments
|
Download
|
|
A + |
LayoutTests/http/tests/htmlimports/csp-not-block-import-in-import-expected.txt
|
View
|
1
2
3
4
5
|
0 chunks |
+-1 lines, --1 lines |
0 comments
|
Download
|
|
A |
LayoutTests/http/tests/htmlimports/resources/csp-blocking.cgi
|
View
|
1
2
3
4
5
|
1 chunk |
+9 lines, -0 lines |
0 comments
|
Download
|
|
A |
LayoutTests/http/tests/htmlimports/resources/having-csp-directive.html
|
View
|
1
2
3
4
5
|
1 chunk |
+8 lines, -0 lines |
0 comments
|
Download
|
|
A |
LayoutTests/http/tests/htmlimports/resources/importing-cors.html
|
View
|
|
1 chunk |
+7 lines, -0 lines |
0 comments
|
Download
|
|
M |
Source/core/dom/Document.h
|
View
|
1
2
3
4
5
|
2 chunks |
+2 lines, -1 line |
0 comments
|
Download
|
|
M |
Source/core/dom/Document.cpp
|
View
|
1
2
3
4
5
6
|
3 chunks |
+8 lines, -6 lines |
0 comments
|
Download
|
|
M |
Source/core/dom/DocumentInit.h
|
View
|
1
2
3
4
5
6
|
2 chunks |
+3 lines, -0 lines |
0 comments
|
Download
|
|
M |
Source/core/dom/DocumentInit.cpp
|
View
|
1
2
3
|
1 chunk |
+17 lines, -2 lines |
0 comments
|
Download
|
|
M |
Source/core/html/HTMLImport.h
|
View
|
1
2
3
4
5
6
|
2 chunks |
+4 lines, -0 lines |
0 comments
|
Download
|
|
M |
Source/core/html/HTMLImport.cpp
|
View
|
|
1 chunk |
+10 lines, -0 lines |
0 comments
|
Download
|
|
M |
Source/core/html/HTMLImportsController.h
|
View
|
1
2
3
4
5
6
|
4 chunks |
+7 lines, -2 lines |
0 comments
|
Download
|
|
M |
Source/core/html/HTMLImportsController.cpp
|
View
|
1
2
3
4
5
6
7
8
|
10 chunks |
+40 lines, -16 lines |
0 comments
|
Download
|
|
M |
Source/core/loader/FrameLoader.cpp
|
View
|
1
2
3
4
5
|
2 chunks |
+1 line, -17 lines |
0 comments
|
Download
|
|
M |
Source/core/loader/cache/CachedResource.h
|
View
|
1
2
3
4
5
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
|
M |
Source/core/loader/cache/ResourceFetcher.h
|
View
|
1
2
3
4
5
|
2 chunks |
+2 lines, -0 lines |
0 comments
|
Download
|
|
M |
Source/core/loader/cache/ResourceFetcher.cpp
|
View
|
1
2
3
4
5
6
|
15 chunks |
+42 lines, -7 lines |
0 comments
|
Download
|
|
M |
Source/core/page/ContentSecurityPolicy.h
|
View
|
1
2
3
4
5
|
3 chunks |
+20 lines, -0 lines |
0 comments
|
Download
|
|
M |
Source/core/page/ContentSecurityPolicy.cpp
|
View
|
1
2
3
4
5
|
3 chunks |
+27 lines, -1 line |
0 comments
|
Download
|
Total messages: 26 (0 generated)
|