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

Unified Diff: content/browser/indexed_db/indexed_db_internals_ui.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: content/browser/indexed_db/indexed_db_internals_ui.cc
diff --git a/content/browser/indexed_db/indexed_db_internals_ui.cc b/content/browser/indexed_db/indexed_db_internals_ui.cc
index f333f5266c4b8cb6454aa16b55f50e2b4e47ddbf..81fc46cd34459492ade9dc773c4e8f8a7e46ad0b 100644
--- a/content/browser/indexed_db/indexed_db_internals_ui.cc
+++ b/content/browser/indexed_db/indexed_db_internals_ui.cc
@@ -299,8 +299,8 @@ void IndexedDBInternalsUI::OnDownloadDataReady(
DownloadManager* dlm = BrowserContext::GetDownloadManager(browser_context);
const GURL referrer(web_ui()->GetWebContents()->GetLastCommittedURL());
- dl_params->set_referrer(
- content::Referrer(referrer, blink::WebReferrerPolicyDefault));
+ dl_params->set_referrer(content::Referrer::SanitizeForRequest(
+ url, content::Referrer(referrer, blink::WebReferrerPolicyDefault)));
// This is how to watch for the download to finish: first wait for it
// to start, then attach a DownloadItem::Observer to observe the

Powered by Google App Engine
This is Rietveld 408576698