diff options
author | jochen <jochen@chromium.org> | 2015-02-09 11:15:33 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-02-09 19:16:15 +0000 |
commit | 8dcfbfdca890446d10a601414fe240bf6e07f70d (patch) | |
tree | 53594a0817ba31055dae3fc74b7640f69c09d5a5 /components/sessions | |
parent | 2567caca45d545c21cd81c7cb42edd29a4c68515 (diff) | |
download | chromium_src-8dcfbfdca890446d10a601414fe240bf6e07f70d.zip chromium_src-8dcfbfdca890446d10a601414fe240bf6e07f70d.tar.gz chromium_src-8dcfbfdca890446d10a601414fe240bf6e07f70d.tar.bz2 |
Sanitize referrers before we create them
Unless we reconstruct an already sanitized referrer from the referrer
url and the referrer policy, we should always sanitize it before
constructing a request from it.
BUG=454621,422871
R=mkwst@chromium.org,jam@chromium.org
Review URL: https://codereview.chromium.org/898613004
Cr-Commit-Position: refs/heads/master@{#315360}
Diffstat (limited to 'components/sessions')
-rw-r--r-- | components/sessions/content/content_serialized_navigation_builder.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/components/sessions/content/content_serialized_navigation_builder.cc b/components/sessions/content/content_serialized_navigation_builder.cc index a9bd244..a033c64 100644 --- a/components/sessions/content/content_serialized_navigation_builder.cc +++ b/components/sessions/content/content_serialized_navigation_builder.cc @@ -57,14 +57,14 @@ ContentSerializedNavigationBuilder::ToNavigationEntry( scoped_ptr<content::NavigationEntry> entry( content::NavigationController::CreateNavigationEntry( navigation->virtual_url_, - content::Referrer(navigation->referrer_url_, policy), + content::Referrer::SanitizeForRequest( + navigation->virtual_url_, + content::Referrer(navigation->referrer_url_, policy)), // Use a transition type of reload so that we don't incorrectly // increase the typed count. - ui::PAGE_TRANSITION_RELOAD, - false, + ui::PAGE_TRANSITION_RELOAD, false, // The extra headers are not sync'ed across sessions. - std::string(), - browser_context)); + std::string(), browser_context)); entry->SetTitle(navigation->title_); entry->SetPageState(content::PageState::CreateFromEncodedData( |