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

Unified Diff: content/browser/frame_host/render_frame_proxy_host.cc

Issue 1812723002: Add URL validation to navigations initiated via RenderFrameProxyHosts. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 months 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
« no previous file with comments | « no previous file | content/browser/site_per_process_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/frame_host/render_frame_proxy_host.cc
diff --git a/content/browser/frame_host/render_frame_proxy_host.cc b/content/browser/frame_host/render_frame_proxy_host.cc
index 93dd48b64f559ba50d2a5e49bb036bfd6a804a05..122c34184dc59b1e8cdfd189f712dbb4b23b62ab 100644
--- a/content/browser/frame_host/render_frame_proxy_host.cc
+++ b/content/browser/frame_host/render_frame_proxy_host.cc
@@ -258,10 +258,13 @@ void RenderFrameProxyHost::OnOpenURL(
// in the current tab.
DCHECK_EQ(CURRENT_TAB, params.disposition);
+ GURL validated_url(params.url);
+ GetProcess()->FilterURL(false, &validated_url);
Charlie Reis 2016/03/17 17:22:27 nit: We usually try to put this as the first thing
alexmos 2016/03/17 17:30:48 Done.
+
// TODO(alexmos, creis): Figure out whether |params.user_gesture| needs to be
// passed in as well.
frame_tree_node_->navigator()->RequestTransferURL(
- current_rfh, params.url, site_instance_.get(), std::vector<GURL>(),
+ current_rfh, validated_url, site_instance_.get(), std::vector<GURL>(),
params.referrer, ui::PAGE_TRANSITION_LINK, GlobalRequestID(),
params.should_replace_current_entry);
}
« no previous file with comments | « no previous file | content/browser/site_per_process_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698