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

Unified Diff: chrome/browser/extensions/webstore_installer.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/extensions/webstore_installer.cc
diff --git a/chrome/browser/extensions/webstore_installer.cc b/chrome/browser/extensions/webstore_installer.cc
index 592a915292bdd62eb9a33e3cd3c8dd6e30d1d2b8..45d075d93328c8f1ba76ccca9d7db03dd06b8ad2 100644
--- a/chrome/browser/extensions/webstore_installer.cc
+++ b/chrome/browser/extensions/webstore_installer.cc
@@ -649,9 +649,9 @@ void WebstoreInstaller::StartDownload(const std::string& extension_id,
resource_context));
params->set_file_path(file);
if (controller.GetVisibleEntry())
- params->set_referrer(
- content::Referrer(controller.GetVisibleEntry()->GetURL(),
- blink::WebReferrerPolicyDefault));
+ params->set_referrer(content::Referrer::SanitizeForRequest(
+ download_url_, content::Referrer(controller.GetVisibleEntry()->GetURL(),
+ blink::WebReferrerPolicyDefault)));
params->set_callback(base::Bind(&WebstoreInstaller::OnDownloadStarted,
this,
extension_id));

Powered by Google App Engine
This is Rietveld 408576698