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

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

Issue 2905043004: Ensure the renderer doesn't specify base_url_for_data_url in the BeginNavigation IPC. (Closed)
Patch Set: merge 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
« no previous file with comments | « content/browser/bad_message.h ('k') | tools/metrics/histograms/enums.xml » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1873 matching lines...) Expand 10 before | Expand all | Expand 10 after
4071 } 4076 }
4072 4077
4073 void RenderFrameHostImpl::ForwardGetInterfaceToRenderFrame( 4078 void RenderFrameHostImpl::ForwardGetInterfaceToRenderFrame(
4074 const std::string& interface_name, 4079 const std::string& interface_name,
4075 mojo::ScopedMessagePipeHandle pipe) { 4080 mojo::ScopedMessagePipeHandle pipe) {
4076 GetRemoteInterfaces()->GetInterface(interface_name, std::move(pipe)); 4081 GetRemoteInterfaces()->GetInterface(interface_name, std::move(pipe));
4077 } 4082 }
4078 #endif 4083 #endif
4079 4084
4080 } // namespace content 4085 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/bad_message.h ('k') | tools/metrics/histograms/enums.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698