File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
chromium/content/browser/renderer_host Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -6955,10 +6955,18 @@ void RenderFrameHostImpl::DidBlockNavigation(
6955
6955
const GURL& blocked_url,
6956
6956
const GURL& initiator_url,
6957
6957
blink::mojom::NavigationBlockedReason reason) {
6958
+ // Do not allow renderers to show off-limits URLs in the blocked dialog.
6959
+ GURL validated_blocked_url = blocked_url;
6960
+ GURL validated_initiator_url = initiator_url;
6961
+ RenderProcessHost* process = GetProcess();
6962
+ process->FilterURL(/*empty_allowed=*/false, &validated_blocked_url);
6963
+ process->FilterURL(/*empty_allowed=*/false, &validated_initiator_url);
6964
+
6958
6965
// Cross-origin navigations are not allowed in prerendering so we can not
6959
6966
// reach here while prerendering.
6960
6967
DCHECK_NE(lifecycle_state(), LifecycleStateImpl::kPrerendering);
6961
- delegate_->OnDidBlockNavigation(blocked_url, initiator_url, reason);
6968
+ delegate_->OnDidBlockNavigation(validated_blocked_url,
6969
+ validated_initiator_url, reason);
6962
6970
}
6963
6971
6964
6972
void RenderFrameHostImpl::DidChangeLoadProgress(double load_progress) {
You can’t perform that action at this time.
0 commit comments