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

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

Issue 2905293002: Ensure the renderer doesn't specify base_url_for_data_url in the BeginNavigation IPC. (Closed)
Patch Set: Created 3 years, 7 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
Index: content/browser/frame_host/render_frame_host_impl.cc
diff --git a/content/browser/frame_host/render_frame_host_impl.cc b/content/browser/frame_host/render_frame_host_impl.cc
index 2bdb04d78b4352fa6e12420164ff14aa43964385..3cd8dc1905114e982c7cbb7e2c58d09cf272959c 100644
--- a/content/browser/frame_host/render_frame_host_impl.cc
+++ b/content/browser/frame_host/render_frame_host_impl.cc
@@ -2185,6 +2185,11 @@ void RenderFrameHostImpl::OnBeginNavigation(
CommonNavigationParams validated_params = common_params;
GetProcess()->FilterURL(false, &validated_params.url);
+ if (!validated_params.base_url_for_data_url.is_empty()) {
+ // Kills the process. http://crbug.com/726142
+ bad_message::ReceivedBadMessage(
+ GetProcess(), bad_message::RFH_BASE_URL_FOR_DATA_URL_SPECIFIED);
Charlie Reis 2017/05/30 20:41:48 This needs a return statement, or we'll continue w
+ }
BeginNavigationParams validated_begin_params = begin_params;
GetProcess()->FilterURL(true, &validated_begin_params.searchable_form_url);

Powered by Google App Engine
This is Rietveld 408576698