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

Unified Diff: components/sessions/content/content_serialized_navigation_builder.cc

Issue 898613004: Sanitize referrers before we create them (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: components/sessions/content/content_serialized_navigation_builder.cc
diff --git a/components/sessions/content/content_serialized_navigation_builder.cc b/components/sessions/content/content_serialized_navigation_builder.cc
index a9bd2446a1ca7de62e324fabbcb396a38dadf3e5..a033c64a4e5bc6315c02b75107861899ea8a3183 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(

Powered by Google App Engine
This is Rietveld 408576698