Index: chrome/browser/browser_about_handler.cc |
diff --git a/chrome/browser/browser_about_handler.cc b/chrome/browser/browser_about_handler.cc |
index 7d1958577adfd67905f0e0217cb3c44b65a7c799..f7b7edac84a1867fa409401d5f9a8c8caf97a176 100644 |
--- a/chrome/browser/browser_about_handler.cc |
+++ b/chrome/browser/browser_about_handler.cc |
@@ -16,6 +16,16 @@ |
#include "chrome/common/url_constants.h" |
#include "components/url_fixer/url_fixer.h" |
+bool FixupBrowserAboutURL(GURL* url, |
+ content::BrowserContext* browser_context) { |
+ // Ensure that any cleanup done by FixupURL happens before the rewriting |
+ // phase that determines the virtual URL, by including it in an initial |
+ // URLHandler. This prevents minor changes from producing a virtual URL, |
+ // which could lead to a URL spoof. |
+ *url = url_fixer::FixupURL(url->possibly_invalid_spec(), std::string()); |
+ return true; |
+} |
+ |
bool WillHandleBrowserAboutURL(GURL* url, |
content::BrowserContext* browser_context) { |
// TODO(msw): Eliminate "about:*" constants and literals from code and tests, |