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

Unified Diff: chrome/browser/ui/extensions/application_launch.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: chrome/browser/ui/extensions/application_launch.cc
diff --git a/chrome/browser/ui/extensions/application_launch.cc b/chrome/browser/ui/extensions/application_launch.cc
index 931fc0f39de293ec59c51f0478f3f240e5dceb67..996d3ff483116f5f8b1fe11f8b48db20294c78d6 100644
--- a/chrome/browser/ui/extensions/application_launch.cc
+++ b/chrome/browser/ui/extensions/application_launch.cc
@@ -262,10 +262,10 @@ WebContents* OpenApplicationTab(const AppLaunchParams& launch_params,
int tab_index = model->GetIndexOfWebContents(existing_tab);
existing_tab->OpenURL(content::OpenURLParams(
- url,
- content::Referrer(existing_tab->GetURL(),
- blink::WebReferrerPolicyDefault),
- disposition, ui::PAGE_TRANSITION_LINK, false));
+ url, content::Referrer::SanitizeForRequest(
+ url, content::Referrer(existing_tab->GetURL(),
+ blink::WebReferrerPolicyDefault)),
+ disposition, ui::PAGE_TRANSITION_LINK, false));
// Reset existing_tab as OpenURL() may have clobbered it.
existing_tab = browser->tab_strip_model()->GetActiveWebContents();
if (params.tabstrip_add_types & TabStripModel::ADD_PINNED) {

Powered by Google App Engine
This is Rietveld 408576698