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

Issue 11416121: Prevent cross-site pages when --site-per-process is passed (Closed)

Created:
8 years, 1 month ago by irobert
Modified:
8 years ago
CC:
chromium-reviews, joi+watch-content_chromium.org, darin-cc_chromium.org, jam, nasko
Visibility:
Public.

Description

Prevent cross-site pages if the --site-per-process flag is passed BUG=159215 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=172403

Patch Set 1 : Fix resource_type #

Patch Set 2 : Fix Merger CanRequestURL API #

Patch Set 3 : Fix #

Total comments: 23

Patch Set 4 : Fix CanLoadPage #

Patch Set 5 : Fix Iframe Redirect Flaw #

Total comments: 16

Patch Set 6 : Fix Redirect Bug and Tests #

Total comments: 26

Patch Set 7 : Fix Comments #

Total comments: 29

Patch Set 8 : Fix Comments #

Total comments: 2

Patch Set 9 : Fix NotificationObserver #

Total comments: 1

Patch Set 10 : Fix Failure Test #

Patch Set 11 : Test #

Patch Set 12 : Fix Test #

Patch Set 13 : Fix #

Unified diffs Side-by-side diffs Delta from patch set Stats (+463 lines, -1 line) Patch
M chrome/browser/chrome_content_browser_client_browsertest.cc View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -1 line 0 comments Download
M content/browser/child_process_security_policy_impl.h View 1 2 3 4 5 6 7 2 chunks +8 lines, -0 lines 0 comments Download
M content/browser/child_process_security_policy_impl.cc View 1 2 3 4 5 6 7 2 chunks +32 lines, -0 lines 0 comments Download
M content/browser/loader/resource_loader.cc View 1 2 3 4 5 6 7 11 3 chunks +16 lines, -0 lines 0 comments Download
A content/browser/site_per_process_browsertest.cc View 1 2 3 4 5 6 7 8 1 chunk +397 lines, -0 lines 0 comments Download
M content/content_tests.gypi View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -0 lines 0 comments Download
A content/test/data/site_per_process_main.html View 1 2 3 4 5 1 chunk +7 lines, -0 lines 0 comments Download

Messages

Total messages: 25 (0 generated)
irobert
https://codereview.chromium.org/11416121/diff/15008/content/browser/child_process_security_policy_unittest.cc File content/browser/child_process_security_policy_unittest.cc (right): https://codereview.chromium.org/11416121/diff/15008/content/browser/child_process_security_policy_unittest.cc#newcode146 content/browser/child_process_security_policy_unittest.cc:146: ResourceType::LAST_TYPE)); For these tests, resource type does not matter ...
8 years ago (2012-11-28 01:27:57 UTC) #1
Charlie Reis
Thanks for trying out this approach. I'm now concerned about all the changes to CanRequestURL, ...
8 years ago (2012-11-28 18:58:26 UTC) #2
irobert
https://codereview.chromium.org/11416121/diff/15008/content/browser/child_process_security_policy_impl.cc File content/browser/child_process_security_policy_impl.cc (right): https://codereview.chromium.org/11416121/diff/15008/content/browser/child_process_security_policy_impl.cc#newcode72 content/browser/child_process_security_policy_impl.cc:72: GURL site_gurl = SiteInstanceImpl::GetSiteForURL(NULL, gurl); On 2012/11/28 18:58:26, creis ...
8 years ago (2012-11-28 22:50:40 UTC) #3
Charlie Reis
Great. Some nits below, but the main remaining question is where to put the check ...
8 years ago (2012-11-29 22:00:54 UTC) #4
Charlie Reis
Oh, you may also want to change the title and description of this CL from ...
8 years ago (2012-11-29 22:03:06 UTC) #5
irobert
https://codereview.chromium.org/11416121/diff/3004/content/browser/child_process_security_policy_impl.cc File content/browser/child_process_security_policy_impl.cc (right): https://codereview.chromium.org/11416121/diff/3004/content/browser/child_process_security_policy_impl.cc#newcode174 content/browser/child_process_security_policy_impl.cc:174: // apps URLs. Currently, hosted apps cannot set cookies ...
8 years ago (2012-12-01 00:02:48 UTC) #6
Charlie Reis
Great. Glad you added some tests, and it looks like the check is in the ...
8 years ago (2012-12-05 02:02:58 UTC) #7
irobert
https://codereview.chromium.org/11416121/diff/9013/content/browser/child_process_security_policy_impl.h File content/browser/child_process_security_policy_impl.h (right): https://codereview.chromium.org/11416121/diff/9013/content/browser/child_process_security_policy_impl.h#newcode115 content/browser/child_process_security_policy_impl.h:115: // the given origin in main frames or subframes.. ...
8 years ago (2012-12-05 19:00:03 UTC) #8
Charlie Reis
Almost there. Nasko, perhaps you can take a look over this as well, to make ...
8 years ago (2012-12-06 01:42:45 UTC) #9
nasko
A few nits and one important question about the NULL parameter. https://codereview.chromium.org/11416121/diff/28001/content/browser/child_process_security_policy_impl.cc File content/browser/child_process_security_policy_impl.cc (right): ...
8 years ago (2012-12-06 17:20:15 UTC) #10
Charlie Reis
https://codereview.chromium.org/11416121/diff/28001/content/browser/child_process_security_policy_impl.cc File content/browser/child_process_security_policy_impl.cc (right): https://codereview.chromium.org/11416121/diff/28001/content/browser/child_process_security_policy_impl.cc#newcode176 content/browser/child_process_security_policy_impl.cc:176: GURL site_gurl = SiteInstanceImpl::GetSiteForURL(NULL, gurl); On 2012/12/06 17:20:15, nasko ...
8 years ago (2012-12-06 18:07:17 UTC) #11
irobert
https://codereview.chromium.org/11416121/diff/28001/content/browser/child_process_security_policy_impl.cc File content/browser/child_process_security_policy_impl.cc (right): https://codereview.chromium.org/11416121/diff/28001/content/browser/child_process_security_policy_impl.cc#newcode170 content/browser/child_process_security_policy_impl.cc:170: bool CanLoadPage(const GURL& gurl){ On 2012/12/06 01:42:45, creis wrote: ...
8 years ago (2012-12-06 19:10:40 UTC) #12
Charlie Reis
https://codereview.chromium.org/11416121/diff/28001/content/browser/site_per_process_browsertest.cc File content/browser/site_per_process_browsertest.cc (right): https://codereview.chromium.org/11416121/diff/28001/content/browser/site_per_process_browsertest.cc#newcode218 content/browser/site_per_process_browsertest.cc:218: &shell()->web_contents()->GetController())); On 2012/12/06 19:10:40, irobert wrote: > I think ...
8 years ago (2012-12-06 20:20:22 UTC) #13
irobert
https://codereview.chromium.org/11416121/diff/28001/content/browser/site_per_process_browsertest.cc File content/browser/site_per_process_browsertest.cc (right): https://codereview.chromium.org/11416121/diff/28001/content/browser/site_per_process_browsertest.cc#newcode218 content/browser/site_per_process_browsertest.cc:218: &shell()->web_contents()->GetController())); I wrote a new NotificationObeserver which wait until ...
8 years ago (2012-12-06 22:37:02 UTC) #14
Charlie Reis
Great, LGTM. Nasko, if it looks good to you, I'll land it tomorrow.
8 years ago (2012-12-06 22:55:10 UTC) #15
nasko
Let's try not to introduce a new observer. If UrlLoadObserver can work, it will be ...
8 years ago (2012-12-06 23:37:47 UTC) #16
nasko
We tried using the UrlLoadObserver, but it doesn't handle iframe navigations properly. I'm fine using ...
8 years ago (2012-12-07 18:11:34 UTC) #17
Charlie Reis
On 2012/12/07 18:11:34, nasko wrote: > We tried using the UrlLoadObserver, but it doesn't handle ...
8 years ago (2012-12-07 18:15:27 UTC) #18
Charlie Reis
Great. Looks like it's passing the tests now, so LGTM. I'll land it tomorrow morning.
8 years ago (2012-12-11 00:28:46 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/irobert@chromium.org/11416121/75002
8 years ago (2012-12-11 17:31:23 UTC) #20
commit-bot: I haz the power
Presubmit check for 11416121-75002 failed and returned exit status 1. Running presubmit commit checks ...
8 years ago (2012-12-11 17:31:27 UTC) #21
Charlie Reis
Darin, can you give an owner's review on chrome/browser/chrome_content_browser_client_browsertest.cc? We needed to change the test ...
8 years ago (2012-12-11 17:36:25 UTC) #22
darin (slow to review)
LGTM
8 years ago (2012-12-11 19:17:21 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/irobert@chromium.org/11416121/75002
8 years ago (2012-12-11 19:25:48 UTC) #24
commit-bot: I haz the power
8 years ago (2012-12-11 21:24:14 UTC) #25
Message was sent while issue was closed.
Change committed as 172403

Powered by Google App Engine
This is Rietveld 408576698