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

Unified Diff: content/browser/renderer_host/render_view_host_impl.cc

Issue 11416121: Prevent cross-site pages when --site-per-process is passed (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/renderer_host/render_view_host_impl.cc
diff --git a/content/browser/renderer_host/render_view_host_impl.cc b/content/browser/renderer_host/render_view_host_impl.cc
index 60edf72f5a339f196864b52838442dad8188fc78..3be3b79ad6707bba0e64a68df1f265b3f954f82e 100644
--- a/content/browser/renderer_host/render_view_host_impl.cc
+++ b/content/browser/renderer_host/render_view_host_impl.cc
@@ -1737,7 +1737,9 @@ void RenderViewHostImpl::FilterURL(ChildProcessSecurityPolicyImpl* policy,
bool non_web_url_in_guest = process->IsGuest() &&
!(url->is_valid() && policy->IsWebSafeScheme(url->scheme()));
- if (non_web_url_in_guest || !policy->CanRequestURL(process->GetID(), *url)) {
+ if (non_web_url_in_guest ||
+ !policy->CanRequestURL(process->GetID(),
+ *url, ResourceType::MAIN_FRAME)) {
irobert 2012/11/28 01:27:57 It is hard to tell whether this navigation is main
Charlie Reis 2012/11/28 18:58:26 Hmm, actually, this is problematic. FilterURL get
irobert 2012/11/28 22:50:41 Done.
// If this renderer is not permitted to request this URL, we invalidate the
// URL. This prevents us from storing the blocked URL and becoming confused
// later.

Powered by Google App Engine
This is Rietveld 408576698