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

Issue 2764363002: PlzNavigate: sanitize the referrer in NavigationRequest (Closed)

Created:
3 years, 9 months ago by clamy
Modified:
3 years, 9 months ago
Reviewers:
jam, nasko, wychen
CC:
chromium-reviews, mlamouri+watch-content_chromium.org, creis+watch_chromium.org, Peter Beverloo, nasko+codewatch_chromium.org, jam, darin-cc_chromium.org, jochen+watch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

PlzNavigate: sanitize the referrer in NavigationRequest This CL ensures that the referrer in CommonNavigationParams is properly sanitized for navigation requests when PlzNavigate is enabled. BUG=659089 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation Review-Url: https://codereview.chromium.org/2764363002 Cr-Commit-Position: refs/heads/master@{#458806} Committed: https://chromium.googlesource.com/chromium/src/+/a6d343f911171278376b4509f7da9d90592b03ee

Patch Set 1 #

Total comments: 6

Patch Set 2 : Addressed comments #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+59 lines, -0 lines) Patch
M content/browser/browser_side_navigation_browsertest.cc View 1 3 chunks +34 lines, -0 lines 0 comments Download
M content/browser/frame_host/navigation_request.cc View 2 chunks +7 lines, -0 lines 3 comments Download
M content/shell/browser/shell_network_delegate.h View 2 chunks +5 lines, -0 lines 0 comments Download
M content/shell/browser/shell_network_delegate.cc View 3 chunks +13 lines, -0 lines 0 comments Download

Messages

Total messages: 18 (10 generated)
clamy
@nasko, jam: PTAL This is the fix for the Referrer issue we're seeing on Canary.
3 years, 9 months ago (2017-03-22 16:57:12 UTC) #6
nasko
LGTM with some nits. https://codereview.chromium.org/2764363002/diff/1/content/browser/browser_side_navigation_browsertest.cc File content/browser/browser_side_navigation_browsertest.cc (right): https://codereview.chromium.org/2764363002/diff/1/content/browser/browser_side_navigation_browsertest.cc#newcode311 content/browser/browser_side_navigation_browsertest.cc:311: CHECK(root->navigation_request()); nit: ASSERT_TRUE https://codereview.chromium.org/2764363002/diff/1/content/browser/browser_side_navigation_browsertest.cc#newcode320 content/browser/browser_side_navigation_browsertest.cc:320: ...
3 years, 9 months ago (2017-03-22 17:11:12 UTC) #7
clamy
Thanks! https://codereview.chromium.org/2764363002/diff/1/content/browser/browser_side_navigation_browsertest.cc File content/browser/browser_side_navigation_browsertest.cc (right): https://codereview.chromium.org/2764363002/diff/1/content/browser/browser_side_navigation_browsertest.cc#newcode311 content/browser/browser_side_navigation_browsertest.cc:311: CHECK(root->navigation_request()); On 2017/03/22 17:11:12, nasko (out) wrote: > ...
3 years, 9 months ago (2017-03-22 17:18:58 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2764363002/20001
3 years, 9 months ago (2017-03-22 17:19:24 UTC) #11
commit-bot: I haz the power
Committed patchset #2 (id:20001) as https://chromium.googlesource.com/chromium/src/+/a6d343f911171278376b4509f7da9d90592b03ee
3 years, 9 months ago (2017-03-22 18:21:26 UTC) #14
wychen
https://codereview.chromium.org/2764363002/diff/20001/content/browser/frame_host/navigation_request.cc File content/browser/frame_host/navigation_request.cc (right): https://codereview.chromium.org/2764363002/diff/20001/content/browser/frame_host/navigation_request.cc#newcode373 content/browser/frame_host/navigation_request.cc:373: Referrer::SanitizeForRequest(common_params_.url, Do we need to sanitize it here?
3 years, 9 months ago (2017-03-22 21:18:05 UTC) #16
jam
https://codereview.chromium.org/2764363002/diff/20001/content/browser/frame_host/navigation_request.cc File content/browser/frame_host/navigation_request.cc (right): https://codereview.chromium.org/2764363002/diff/20001/content/browser/frame_host/navigation_request.cc#newcode373 content/browser/frame_host/navigation_request.cc:373: Referrer::SanitizeForRequest(common_params_.url, On 2017/03/22 21:18:05, wychen wrote: > Do we ...
3 years, 9 months ago (2017-03-23 23:35:17 UTC) #17
wychen
3 years, 9 months ago (2017-03-23 23:48:03 UTC) #18
Message was sent while issue was closed.
https://codereview.chromium.org/2764363002/diff/20001/content/browser/frame_h...
File content/browser/frame_host/navigation_request.cc (right):

https://codereview.chromium.org/2764363002/diff/20001/content/browser/frame_h...
content/browser/frame_host/navigation_request.cc:373:
Referrer::SanitizeForRequest(common_params_.url,
On 2017/03/23 23:35:17, jam wrote:
> On 2017/03/22 21:18:05, wychen wrote:
> > Do we need to sanitize it here?
> 
> This is done in the constructor.

This is exactly what I thought. So we can directly use common_params_.referrer,
rather than calling SanitizeForRequest() again here, right?

Powered by Google App Engine
This is Rietveld 408576698