|
Replicate Content-Security-Policy into remote frame proxies.
After this CL, when a local frame parses a new CSP header (from http
headers, from <meta> element, or when copying CSP from the parent frame
in case of about:blank children), a notification will be sent all the
way to the browser. The browser will store the CSP accumulated headers
in FrameReplicationState and notify RenderFrameProxies.
RenderFrameProxy will take care of using CSP headers received from the
browser to fill out RemoteSecurityContext's ContentSecurityPolicy.
After this CL, frame-src is properly enforced when navigating a frame
when its parent is a remote frame proxy. For example, when running
http/tests/security/contentSecurityPolicy/frame-src-child-frame-navigates-to-blocked-origin.html
the subframe navigation is blocked after this CL. OTOH, we cannot yet
enable this test, because the console message about CSP violation is
currently dropped when CSP comes from a remote frame. To work around
this, a few regression tests are being added by this CL as browser
tests.
BUG= 585501
CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_site_isolation
Committed: https://crrev.com/8e1c02e4ee2f50b204c234c033d09a4a866bf932
Cr-Commit-Position: refs/heads/master@{#394200}
Total comments: 39
Total comments: 12
Total comments: 14
Total comments: 6
Total comments: 6
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+563 lines, -29 lines) |
Patch |
|
M |
content/browser/frame_host/frame_tree_node.h
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
2 chunks |
+9 lines, -0 lines |
0 comments
|
Download
|
|
M |
content/browser/frame_host/frame_tree_node.cc
|
View
|
9
10
11
|
1 chunk |
+11 lines, -0 lines |
0 comments
|
Download
|
|
M |
content/browser/frame_host/navigator_impl.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
|
1 chunk |
+5 lines, -0 lines |
0 comments
|
Download
|
|
M |
content/browser/frame_host/render_frame_host_impl.h
|
View
|
1
2
|
2 chunks |
+2 lines, -0 lines |
0 comments
|
Download
|
|
M |
content/browser/frame_host/render_frame_host_impl.cc
|
View
|
1
2
|
2 chunks |
+7 lines, -0 lines |
0 comments
|
Download
|
|
M |
content/browser/frame_host/render_frame_host_manager.h
|
View
|
|
2 chunks |
+7 lines, -0 lines |
0 comments
|
Download
|
|
M |
content/browser/frame_host/render_frame_host_manager.cc
|
View
|
1
2
|
1 chunk |
+21 lines, -0 lines |
0 comments
|
Download
|
|
M |
content/browser/site_per_process_browsertest.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
2 chunks |
+214 lines, -0 lines |
0 comments
|
Download
|
|
M |
content/common/content_param_traits_macros.h
|
View
|
|
1 chunk |
+2 lines, -0 lines |
0 comments
|
Download
|
|
A |
content/common/content_security_policy_header.h
|
View
|
|
1 chunk |
+24 lines, -0 lines |
0 comments
|
Download
|
|
M |
content/common/frame_messages.h
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
5 chunks |
+24 lines, -0 lines |
0 comments
|
Download
|
|
M |
content/common/frame_replication_state.h
|
View
|
|
2 chunks |
+8 lines, -0 lines |
0 comments
|
Download
|
|
M |
content/content_common.gypi
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
content/renderer/render_frame_impl.h
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
1 chunk |
+4 lines, -0 lines |
0 comments
|
Download
|
|
M |
content/renderer/render_frame_impl.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
2 chunks |
+15 lines, -0 lines |
0 comments
|
Download
|
|
M |
content/renderer/render_frame_proxy.h
|
View
|
|
2 chunks |
+3 lines, -0 lines |
0 comments
|
Download
|
|
M |
content/renderer/render_frame_proxy.cc
|
View
|
|
4 chunks |
+20 lines, -0 lines |
0 comments
|
Download
|
|
A |
content/test/data/frame-src-self-and-b.html
|
View
|
1
2
3
4
5
6
7
8
9
|
1 chunk |
+21 lines, -0 lines |
0 comments
|
Download
|
|
A |
content/test/data/frame-src-self-and-b.html.mock-http-headers
|
View
|
1
2
3
4
|
1 chunk |
+2 lines, -0 lines |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/core/dom/RemoteSecurityContext.h
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/core/dom/RemoteSecurityContext.cpp
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
3 chunks |
+10 lines, -3 lines |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/core/frame/LocalFrame.h
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
1 chunk |
+2 lines, -0 lines |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/core/frame/LocalFrame.cpp
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
1 chunk |
+5 lines, -0 lines |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicy.h
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
3 chunks |
+6 lines, -2 lines |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicy.cpp
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
9 chunks |
+54 lines, -16 lines |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/core/loader/FrameLoader.cpp
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
2 chunks |
+22 lines, -8 lines |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/core/loader/FrameLoaderClient.h
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
2 chunks |
+7 lines, -0 lines |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/web/AssertMatchingEnums.cpp
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
1 chunk |
+3 lines, -0 lines |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/web/FrameLoaderClientImpl.h
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/web/FrameLoaderClientImpl.cpp
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
1 chunk |
+13 lines, -0 lines |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/web/WebRemoteFrameImpl.h
|
View
|
|
1 chunk |
+2 lines, -0 lines |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/web/WebRemoteFrameImpl.cpp
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
2 chunks |
+16 lines, -0 lines |
0 comments
|
Download
|
|
M |
third_party/WebKit/public/web/WebContentSecurityPolicy.h
|
View
|
|
1 chunk |
+6 lines, -0 lines |
0 comments
|
Download
|
|
M |
third_party/WebKit/public/web/WebFrameClient.h
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
2 chunks |
+7 lines, -0 lines |
0 comments
|
Download
|
|
M |
third_party/WebKit/public/web/WebRemoteFrame.h
|
View
|
|
3 chunks |
+8 lines, -0 lines |
0 comments
|
Download
|
Total messages: 35 (10 generated)
|