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

Issue 2321503002: (Re-)introduce AncestorThrottle to handle 'X-Frame-Options'. (Closed)

Created:
4 years, 3 months ago by Mike West
Modified:
3 years, 9 months ago
Reviewers:
clamy, Charlie Reis, alexmos
CC:
apavlov+blink_chromium.org, blink-reviews, blink-reviews-dom_chromium.org, caseq+blink_chromium.org, chromium-reviews, creis+watch_chromium.org, Charlie Reis, darin-cc_chromium.org, devtools-reviews_chromium.org, dglazkov+blink, eae+blinkwatch, gavinp+loader_chromium.org, jam, Nate Chapin, kozyatinskiy+blink_chromium.org, loading-reviews_chromium.org, lushnikov+blink_chromium.org, mmenke, nasko+codewatch_chromium.org, pfeldman+blink_chromium.org, Randy Smith (Not in Mondays), rwlbuis, sof, tyoshino+watch_chromium.org, arthursonzogni
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

(Re-)introduce AncestorThrottle to handle 'X-Frame-Options'. This patch moves ancestor-based blocking behavior up from Blink into the browser, which gives us some correctness assurances we can't match in the renderer (for top-level plugins, etc), and ensures that a (malicious?) renderer isn't responsible for policing itself. This is a re-land of https://codereview.chromium.org/1617043002, after clamy@'s heroic refactoring effort to process 'Content-Disposition' and similar download-triggering mechanisms before handing things off to this new throttle. BUG=555418 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation,linux_chromium_browser_side_navigation_rel

Patch Set 1 : rebase #

Patch Set 2 : alexmos@ #

Patch Set 3 : Ugh. #

Total comments: 5

Patch Set 4 : Rebase after a month... #

Unified diffs Side-by-side diffs Delta from patch set Stats (+566 lines, -188 lines) Patch
M chrome/renderer/chrome_content_renderer_client.cc View 1 2 3 1 chunk +16 lines, -0 lines 0 comments Download
M components/error_page/common/localized_error.cc View 1 2 3 2 chunks +8 lines, -0 lines 0 comments Download
M content/browser/BUILD.gn View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
A content/browser/frame_host/ancestor_throttle.h View 1 chunk +67 lines, -0 lines 0 comments Download
A content/browser/frame_host/ancestor_throttle.cc View 1 chunk +186 lines, -0 lines 0 comments Download
A content/browser/frame_host/ancestor_throttle_unittest.cc View 1 chunk +183 lines, -0 lines 0 comments Download
M content/browser/frame_host/navigation_handle_impl.h View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download
M content/browser/frame_host/navigation_handle_impl.cc View 1 2 3 8 chunks +22 lines, -4 lines 0 comments Download
M content/browser/frame_host/navigation_handle_impl_unittest.cc View 1 2 3 7 chunks +12 lines, -7 lines 0 comments Download
M content/browser/loader/navigation_resource_throttle.cc View 1 2 3 1 chunk +10 lines, -0 lines 0 comments Download
M content/browser/site_per_process_browsertest.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M content/public/browser/navigation_throttle.h View 2 chunks +7 lines, -1 line 0 comments Download
M content/test/BUILD.gn View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/inspector/network/x-frame-options-deny.html View 1 chunk +3 lines, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/inspector/network/x-frame-options-deny-expected.txt View 1 chunk +1 line, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/security/XFrameOptions/x-frame-options-deny-expected.txt View 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/security/XFrameOptions/x-frame-options-invalid-expected.txt View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/security/XFrameOptions/x-frame-options-multiple-headers-conflict-expected.txt View 1 chunk +3 lines, -3 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/security/XFrameOptions/x-frame-options-multiple-headers-sameorigin-deny-expected.txt View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/security/XFrameOptions/x-frame-options-none-expected.txt View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/dom/DocumentInit.cpp View 1 2 3 1 chunk +5 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/core/inspector/InspectorInstrumentation.cpp View 1 2 3 1 chunk +5 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/core/inspector/InspectorInstrumentationCustomInl.h View 1 2 3 1 chunk +5 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/core/loader/DocumentLoader.h View 1 2 3 3 chunks +4 lines, -8 lines 0 comments Download
M third_party/WebKit/Source/core/loader/DocumentLoader.cpp View 1 2 3 5 chunks +13 lines, -30 lines 0 comments Download
M third_party/WebKit/Source/core/loader/FrameLoader.h View 1 2 3 1 chunk +0 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/loader/FrameLoader.cpp View 1 2 3 1 chunk +0 lines, -66 lines 0 comments Download
M third_party/WebKit/Source/core/loader/HttpEquiv.h View 1 2 3 1 chunk +0 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/platform/network/HTTPParsers.h View 1 2 3 2 chunks +0 lines, -10 lines 0 comments Download
M third_party/WebKit/Source/platform/network/HTTPParsers.cpp View 1 2 3 1 chunk +0 lines, -29 lines 0 comments Download
M third_party/WebKit/Source/platform/network/ResourceError.h View 1 2 3 2 chunks +5 lines, -0 lines 0 comments Download

Messages

Total messages: 50 (32 generated)
Mike West
alexmos@, clamy@: I'm in the process of rebasing the XFO->Browser changes, and running into an ...
4 years, 3 months ago (2016-09-12 09:30:05 UTC) #15
alexmos
Thanks, this looks great but it seems there's a failing test, SitePerProcessBrowserTest.CrossSiteIframeBlockedByXFrameOptionsOrCSP, which I've added ...
4 years, 3 months ago (2016-09-12 22:17:15 UTC) #18
Mike West
On 2016/09/12 at 22:17:15, alexmos wrote: > Thanks, this looks great but it seems there's ...
4 years, 3 months ago (2016-09-13 13:25:09 UTC) #19
Mike West
> Can you try the repro steps in https://crbug.com/622385 to check that this CL doesn't ...
4 years, 3 months ago (2016-09-13 13:26:45 UTC) #22
Mike West
Hrm. That specific test passes under PlzNavigate, but crashes in status quo (https://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/296682/steps/browser_side_navigation_content_browsertests%20%28with%20patch%29%20on%20Ubuntu-12.04/logs/SitePerProcessBrowserTest.CrossSiteIframeBlockedByXFrameOptionsOrCSP)... probably because ...
4 years, 3 months ago (2016-09-13 18:02:35 UTC) #25
alexmos
On 2016/09/13 18:02:35, Mike West wrote: > Hrm. That specific test passes under PlzNavigate, but ...
4 years, 3 months ago (2016-09-13 19:14:58 UTC) #26
Mike West
On 2016/09/13 at 19:14:58, alexmos wrote: > Hmm, did you mean the reverse? It seems ...
4 years, 3 months ago (2016-09-14 07:45:06 UTC) #27
Mike West
On 2016/09/14 at 07:45:06, Mike West wrote: > > I'm not that familiar with all ...
4 years, 3 months ago (2016-09-14 09:21:25 UTC) #30
clamy
On 2016/09/14 09:21:25, Mike West wrote: > On 2016/09/14 at 07:45:06, Mike West wrote: > ...
4 years, 3 months ago (2016-09-14 11:19:07 UTC) #33
Mike West
On 2016/09/14 at 11:19:07, clamy wrote: > On 2016/09/14 09:21:25, Mike West wrote: > > ...
4 years, 3 months ago (2016-09-14 14:40:17 UTC) #34
clamy
On 2016/09/14 14:40:17, Mike West wrote: > On 2016/09/14 at 11:19:07, clamy wrote: > > ...
4 years, 3 months ago (2016-09-14 14:43:10 UTC) #35
Mike West
On 2016/09/14 at 14:43:10, clamy wrote: > > For this CL, I'm interested in blocking ...
4 years, 3 months ago (2016-09-14 15:48:14 UTC) #36
clamy
On 2016/09/14 15:48:14, Mike West wrote: > On 2016/09/14 at 14:43:10, clamy wrote: > > ...
4 years, 3 months ago (2016-09-14 15:52:53 UTC) #37
alexmos
https://codereview.chromium.org/2321503002/diff/80001/chrome/renderer/chrome_content_renderer_client.cc File chrome/renderer/chrome_content_renderer_client.cc (right): https://codereview.chromium.org/2321503002/diff/80001/chrome/renderer/chrome_content_renderer_client.cc#newcode1038 chrome/renderer/chrome_content_renderer_client.cc:1038: On 2016/09/14 09:21:24, Mike West wrote: > This is ...
4 years, 3 months ago (2016-09-14 20:25:11 UTC) #38
Charlie Reis
Note: I haven't looked at the rest, but I wanted to reply to Alex's question. ...
4 years, 3 months ago (2016-09-14 21:39:05 UTC) #40
alexmos
https://codereview.chromium.org/2321503002/diff/80001/chrome/renderer/chrome_content_renderer_client.cc File chrome/renderer/chrome_content_renderer_client.cc (right): https://codereview.chromium.org/2321503002/diff/80001/chrome/renderer/chrome_content_renderer_client.cc#newcode1038 chrome/renderer/chrome_content_renderer_client.cc:1038: On 2016/09/14 21:39:05, Charlie Reis (slow) wrote: > On ...
4 years, 3 months ago (2016-09-17 01:43:17 UTC) #41
arthursonzogni
Hi there I tried to help. https://codereview.chromium.org/2488743003/ This is a patch that makes PlzNavigate handle ...
4 years, 1 month ago (2016-11-09 15:54:07 UTC) #47
arthursonzogni
4 years, 1 month ago (2016-11-09 15:57:24 UTC) #49

          

Powered by Google App Engine
This is Rietveld 408576698