Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(216)

Issue 2727633005: PlzNavigate: Enforce frame-src CSP on the browser. (Closed)

Created:
3 years, 9 months ago by clamy
Modified:
3 years, 9 months ago
CC:
chromium-reviews, extensions-reviews_chromium.org, creis+watch_chromium.org, mlamouri+watch-content_chromium.org, nasko+codewatch_chromium.org, jam, blink-reviews-api_chromium.org, dglazkov+blink, darin-cc_chromium.org, blink-reviews, chromium-apps-reviews_chromium.org, blink-reviews-frames_chromium.org, kinuko+watch
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

PlzNavigate: Enforce frame-src CSP on the browser. Use a NavigationThrottle to check infringement of the 'frame-src' on the browser-side. Before this patch, a redirect during the navigation could led to a child frame to be displayed inside its parent, even if it was disallowed by its parent. This is based on arthursonzogni's patch https://codereview.chromium.org/2655463006/ that I'm trying to land as he's OOO and it's required to experiment with PlzNavigate on Canary. BUG=685074 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation

Patch Set 1 : Arthur's patch v15 (rebased) #

Patch Set 2 : Addressed Alex's comments + trying to fix subframe swap issue #

Total comments: 18
Unified diffs Side-by-side diffs Delta from patch set Stats (+615 lines, -189 lines) Patch
M chrome/test/data/extensions/api_test/sandboxed_pages_csp/sandboxed.html View 2 chunks +19 lines, -13 lines 0 comments Download
M content/browser/frame_host/ancestor_throttle.h View 2 chunks +5 lines, -0 lines 0 comments Download
M content/browser/frame_host/ancestor_throttle.cc View 2 chunks +41 lines, -0 lines 6 comments Download
M content/browser/frame_host/frame_tree_node.h View 1 3 chunks +2 lines, -8 lines 2 comments Download
M content/browser/frame_host/frame_tree_node.cc View 1 1 chunk +2 lines, -5 lines 0 comments Download
M content/browser/frame_host/interstitial_page_navigator_impl.cc View 1 chunk +9 lines, -9 lines 0 comments Download
M content/browser/frame_host/navigation_entry_impl.cc View 1 chunk +2 lines, -1 line 0 comments Download
M content/browser/frame_host/navigation_handle_impl.h View 4 chunks +13 lines, -2 lines 0 comments Download
M content/browser/frame_host/navigation_handle_impl.cc View 6 chunks +9 lines, -6 lines 0 comments Download
M content/browser/frame_host/navigation_handle_impl_unittest.cc View 1 chunk +2 lines, -1 line 0 comments Download
M content/browser/frame_host/navigation_request.cc View 2 chunks +15 lines, -6 lines 0 comments Download
M content/browser/frame_host/navigator_impl.cc View 1 2 chunks +4 lines, -2 lines 0 comments Download
M content/browser/frame_host/render_frame_host_impl.h View 4 chunks +10 lines, -2 lines 2 comments Download
M content/browser/frame_host/render_frame_host_impl.cc View 5 chunks +35 lines, -4 lines 0 comments Download
M content/browser/frame_host/render_frame_host_manager.cc View 1 2 chunks +19 lines, -0 lines 6 comments Download
M content/browser/site_per_process_browsertest.cc View 4 chunks +97 lines, -25 lines 0 comments Download
M content/common/content_security_policy/content_security_policy.cc View 3 chunks +8 lines, -6 lines 0 comments Download
M content/common/content_security_policy/csp_context.h View 2 chunks +58 lines, -14 lines 2 comments Download
M content/common/content_security_policy/csp_context.cc View 2 chunks +30 lines, -12 lines 0 comments Download
M content/common/content_security_policy/csp_context_unittest.cc View 2 chunks +23 lines, -22 lines 0 comments Download
M content/common/frame_messages.h View 4 chunks +19 lines, -1 line 0 comments Download
M content/common/navigation_params.h View 2 chunks +8 lines, -1 line 0 comments Download
M content/common/navigation_params.cc View 3 chunks +6 lines, -3 lines 0 comments Download
M content/public/browser/navigation_handle.cc View 1 chunk +6 lines, -6 lines 0 comments Download
M content/public/test/render_view_test.cc View 2 chunks +4 lines, -2 lines 0 comments Download
M content/renderer/content_security_policy_util.h View 1 chunk +10 lines, -6 lines 0 comments Download
M content/renderer/content_security_policy_util.cc View 2 chunks +21 lines, -1 line 0 comments Download
M content/renderer/render_frame_impl.h View 2 chunks +3 lines, -0 lines 0 comments Download
M content/renderer/render_frame_impl.cc View 3 chunks +10 lines, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/FlagExpectations/enable-browser-side-navigation View 1 chunk +13 lines, -8 lines 0 comments Download
M third_party/WebKit/Source/core/frame/LocalFrameClient.h View 1 chunk +3 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/loader/EmptyClients.h View 1 chunk +9 lines, -7 lines 0 comments Download
M third_party/WebKit/Source/core/loader/EmptyClients.cpp View 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/loader/FrameLoader.cpp View 2 chunks +13 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/web/LocalFrameClientImpl.h View 1 chunk +9 lines, -7 lines 0 comments Download
M third_party/WebKit/Source/web/LocalFrameClientImpl.cpp View 2 chunks +6 lines, -1 line 0 comments Download
M third_party/WebKit/Source/web/WebLocalFrameImpl.h View 2 chunks +3 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/web/WebLocalFrameImpl.cpp View 1 1 chunk +28 lines, -0 lines 0 comments Download
M third_party/WebKit/public/platform/WebContentSecurityPolicyStruct.h View 2 chunks +30 lines, -0 lines 0 comments Download
M third_party/WebKit/public/web/WebFrameClient.h View 2 chunks +3 lines, -1 line 0 comments Download
M third_party/WebKit/public/web/WebLocalFrame.h View 2 chunks +6 lines, -0 lines 0 comments Download

Messages

Total messages: 15 (9 generated)
clamy
@alexmos, creis: PTAL As arthursonzogni is OOO and CSP support in PlzNavigate is high priority ...
3 years, 9 months ago (2017-03-02 19:12:46 UTC) #4
clamy
@nasko: could you PTAL at this since Charlie is OOO? Thanks!
3 years, 9 months ago (2017-03-03 16:56:26 UTC) #10
nasko
Just a handful of comments. The main concern is whether this CL should just cancel ...
3 years, 9 months ago (2017-03-03 23:04:24 UTC) #11
arthursonzogni
Thanks Camille! I will rebase from you patch. https://codereview.chromium.org/2727633005/diff/20001/content/browser/frame_host/ancestor_throttle.cc File content/browser/frame_host/ancestor_throttle.cc (right): https://codereview.chromium.org/2727633005/diff/20001/content/browser/frame_host/ancestor_throttle.cc#newcode194 content/browser/frame_host/ancestor_throttle.cc:194: is_redirect)) ...
3 years, 9 months ago (2017-03-06 15:10:13 UTC) #13
nasko
Hey Arthur, which CL will be the authoritative for this work? This CL or https://codereview.chromium.org/2655463006/?
3 years, 9 months ago (2017-03-09 05:37:36 UTC) #14
arthursonzogni
3 years, 9 months ago (2017-03-09 13:17:38 UTC) #15
On 2017/03/09 05:37:36, nasko (slow) wrote:
> Hey Arthur, which CL will be the authoritative for this work? This CL or
> https://codereview.chromium.org/2655463006/

Yes, I took back Camille's work in
https://codereview.chromium.org/2655463006
and it is the authoritative one. Sorry if there was some confusion.

Powered by Google App Engine
This is Rietveld 408576698