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

Side by Side Diff: content/browser/frame_host/render_frame_host_impl.cc

Issue 2913813002: Ensure the renderer doesn't specify base_url_for_data_url in the BeginNavigation IPC. (Closed)
Patch Set: Created 3 years, 6 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/frame_host/render_frame_host_impl.h" 5 #include "content/browser/frame_host/render_frame_host_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 2167 matching lines...) Expand 10 before | Expand all | Expand 10 after
2178 CHECK(IsBrowserSideNavigationEnabled()); 2178 CHECK(IsBrowserSideNavigationEnabled());
2179 if (!is_active()) 2179 if (!is_active())
2180 return; 2180 return;
2181 2181
2182 TRACE_EVENT2("navigation", "RenderFrameHostImpl::OnBeginNavigation", 2182 TRACE_EVENT2("navigation", "RenderFrameHostImpl::OnBeginNavigation",
2183 "frame_tree_node", frame_tree_node_->frame_tree_node_id(), "url", 2183 "frame_tree_node", frame_tree_node_->frame_tree_node_id(), "url",
2184 common_params.url.possibly_invalid_spec()); 2184 common_params.url.possibly_invalid_spec());
2185 2185
2186 CommonNavigationParams validated_params = common_params; 2186 CommonNavigationParams validated_params = common_params;
2187 GetProcess()->FilterURL(false, &validated_params.url); 2187 GetProcess()->FilterURL(false, &validated_params.url);
2188 if (!validated_params.base_url_for_data_url.is_empty()) {
2189 // Kills the process. http://crbug.com/726142
2190 bad_message::ReceivedBadMessage(
2191 GetProcess(), bad_message::RFH_BASE_URL_FOR_DATA_URL_SPECIFIED);
2192 }
2188 2193
2189 BeginNavigationParams validated_begin_params = begin_params; 2194 BeginNavigationParams validated_begin_params = begin_params;
2190 GetProcess()->FilterURL(true, &validated_begin_params.searchable_form_url); 2195 GetProcess()->FilterURL(true, &validated_begin_params.searchable_form_url);
2191 2196
2192 if (!ValidateUploadParams(validated_params)) { 2197 if (!ValidateUploadParams(validated_params)) {
2193 bad_message::ReceivedBadMessage(GetProcess(), 2198 bad_message::ReceivedBadMessage(GetProcess(),
2194 bad_message::RFH_ILLEGAL_UPLOAD_PARAMS); 2199 bad_message::RFH_ILLEGAL_UPLOAD_PARAMS);
2195 return; 2200 return;
2196 } 2201 }
2197 2202
(...skipping 1884 matching lines...) Expand 10 before | Expand all | Expand 10 after
4082 } 4087 }
4083 4088
4084 void RenderFrameHostImpl::ForwardGetInterfaceToRenderFrame( 4089 void RenderFrameHostImpl::ForwardGetInterfaceToRenderFrame(
4085 const std::string& interface_name, 4090 const std::string& interface_name,
4086 mojo::ScopedMessagePipeHandle pipe) { 4091 mojo::ScopedMessagePipeHandle pipe) {
4087 GetRemoteInterfaces()->GetInterface(interface_name, std::move(pipe)); 4092 GetRemoteInterfaces()->GetInterface(interface_name, std::move(pipe));
4088 } 4093 }
4089 #endif 4094 #endif
4090 4095
4091 } // namespace content 4096 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/browser_side_navigation_browsertest.cc ('k') | tools/metrics/histograms/enums.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698