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

Unified Diff: chrome/browser/net/net_error_tab_helper.cc

Issue 1276843006: Don't run platform diagnostics tool on invalid URLs from the renderer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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
« no previous file with comments | « no previous file | chrome/browser/net/net_error_tab_helper_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/net/net_error_tab_helper.cc
diff --git a/chrome/browser/net/net_error_tab_helper.cc b/chrome/browser/net/net_error_tab_helper.cc
index 02744df7c73585f6964c6bab8b39cb8a162c2f0d..636f6608725a10aedfed8c63b40f1c8b04c94568 100644
--- a/chrome/browser/net/net_error_tab_helper.cc
+++ b/chrome/browser/net/net_error_tab_helper.cc
@@ -262,7 +262,7 @@ void NetErrorTabHelper::SendInfo() {
void NetErrorTabHelper::RunNetworkDiagnostics(const GURL& url) {
// Only run diagnostics on HTTP or HTTPS URLs. Shouldn't receive URLs with
// any other schemes, but the renderer is not trusted.
- if (!url.SchemeIsHTTPOrHTTPS())
+ if (!url.is_valid() || !url.SchemeIsHTTPOrHTTPS())
return;
// Sanitize URL prior to running diagnostics on it.
RunNetworkDiagnosticsHelper(url.GetOrigin());
« no previous file with comments | « no previous file | chrome/browser/net/net_error_tab_helper_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698