From acea38985242077458da3f7d0401d5d200645e1d Mon Sep 17 00:00:00 2001 From: David Keeler Date: Tue, 26 Aug 2014 11:31:34 -0700 Subject: [PATCH] bug 800882 - make about:certerror clear as to why overrides don't work on HSTS sites r=dao ui-r=phlsa --- .../base/content/aboutcerterror/aboutCertError.xhtml | 10 ++++++++-- .../locales/en-US/chrome/browser/aboutCertError.dtd | 4 ++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/browser/base/content/aboutcerterror/aboutCertError.xhtml b/browser/base/content/aboutcerterror/aboutCertError.xhtml index a46073878341..9371fbc7e818 100644 --- a/browser/base/content/aboutcerterror/aboutCertError.xhtml +++ b/browser/base/content/aboutcerterror/aboutCertError.xhtml @@ -80,7 +80,8 @@ }; replaceWithHost(intro); - if (getCSSClass() == "expertBadCert") { + var cssClass = getCSSClass(); + if (cssClass == "expertBadCert") { toggle('technicalContent'); toggle('expertContent'); } @@ -88,8 +89,12 @@ // Disallow overrides if this is a Strict-Transport-Security // host and the cert is bad (STS Spec section 7.3) or if the // certerror is in a frame (bug 633691). - if (getCSSClass() == "badStsCert" || window != top) + if (cssClass == "badStsCert" || window != top) { document.getElementById("expertContent").setAttribute("hidden", "true"); + } + if (cssClass != "badStsCert") { + document.getElementById("badStsCertExplanation").setAttribute("hidden", "true"); + } var tech = document.getElementById("technicalContentText"); if (tech) @@ -214,6 +219,7 @@

&certerror.whatShouldIDo.heading;

&certerror.whatShouldIDo.content;

+

&certerror.whatShouldIDo.badStsCertExplanation;

diff --git a/browser/locales/en-US/chrome/browser/aboutCertError.dtd b/browser/locales/en-US/chrome/browser/aboutCertError.dtd index 21c722c72dfc..1d44d3600130 100644 --- a/browser/locales/en-US/chrome/browser/aboutCertError.dtd +++ b/browser/locales/en-US/chrome/browser/aboutCertError.dtd @@ -26,6 +26,10 @@ going to the right place. However, this site's identity can't be verified."> +