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

Unified Diff: chrome/browser/extensions/webstore_inline_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_inline_installer.cc
diff --git a/chrome/browser/extensions/webstore_inline_installer.cc b/chrome/browser/extensions/webstore_inline_installer.cc
index a44d4baa5d2809e9066f5b032dc5f7d915aa26ef..d22d3d28f195f30a72e70bd0c8221de9a2805557 100644
--- a/chrome/browser/extensions/webstore_inline_installer.cc
+++ b/chrome/browser/extensions/webstore_inline_installer.cc
@@ -142,12 +142,13 @@ bool WebstoreInlineInstaller::CheckInlineInstallPermitted(
*error = kInvalidWebstoreResponseError;
return false;
}
- web_contents()->OpenURL(
- content::OpenURLParams(
+ web_contents()->OpenURL(content::OpenURLParams(
+ GURL(redirect_url),
+ content::Referrer::SanitizeForRequest(
GURL(redirect_url),
content::Referrer(web_contents()->GetURL(),
- blink::WebReferrerPolicyDefault),
- NEW_FOREGROUND_TAB, ui::PAGE_TRANSITION_AUTO_BOOKMARK, false));
+ blink::WebReferrerPolicyDefault)),
+ NEW_FOREGROUND_TAB, ui::PAGE_TRANSITION_AUTO_BOOKMARK, false));
*error = kInlineInstallSupportedError;
return false;
}

Powered by Google App Engine
This is Rietveld 408576698