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

Unified Diff: chrome/browser/ssl/ssl_error_handler.cc

Issue 1294673005: Disable Name Mismatch redirection for non-overridable SSL errors (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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ssl/ssl_error_handler.cc
diff --git a/chrome/browser/ssl/ssl_error_handler.cc b/chrome/browser/ssl/ssl_error_handler.cc
index 3a0d43d02630446805dac674a2e609d6aaee9f53..230e7ffd3554246c1ee29247ee2ceec3856311a2 100644
--- a/chrome/browser/ssl/ssl_error_handler.cc
+++ b/chrome/browser/ssl/ssl_error_handler.cc
@@ -15,6 +15,7 @@
#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_source.h"
#include "content/public/browser/web_contents.h"
+#include "net/base/net_errors.h"
#if defined(ENABLE_CAPTIVE_PORTAL_DETECTION)
#include "chrome/browser/captive_portal/captive_portal_service.h"
@@ -154,7 +155,8 @@ void SSLErrorHandler::StartHandlingError() {
DCHECK(!dns_names.empty());
GURL suggested_url;
if (IsSSLCommonNameMismatchHandlingEnabled() &&
- ssl_info_.cert_status == net::CERT_STATUS_COMMON_NAME_INVALID &&
+ cert_error_ == net::ERR_CERT_COMMON_NAME_INVALID &&
+ SSLBlockingPage::IsOverridable(options_mask_, profile_) &&
meacer 2015/08/20 20:51:39 Can you add a unit test for this?
Bhanu Dev 2015/08/20 22:45:06 Done.
GetSuggestedUrl(dns_names, &suggested_url)) {
RecordUMA(WWW_MISMATCH_FOUND);
net::CertStatus extra_cert_errors =
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698