Bug 1098371 - create localized version of sslv3 error page, r=mconley

--HG--
extra : rebase_source : 4aaa3e4b7a2de50d0c4e9ec47aa347d3d04b871c
This commit is contained in:
Gijs Kruitbosch 2014-12-19 20:10:56 +00:00
parent 95bc72e53e
commit fd419f1b69
6 changed files with 57 additions and 1 deletions

View File

@ -156,6 +156,30 @@
errDesc.id = "errorLongDesc";
}
if (err == "nssFailure2" &&
sd.textContent.contains("ssl_error_no_cypher_overlap")) {
var ssl3ErrorTitle = document.getElementById("et_ssl3");
var ssl3ErrorDesc = document.getElementById("ed_ssl3");
var ssl3ShortDesc = document.getElementById("esd_ssl3");
var learnMoreText = document.getElementById("learn_more_ssl3");
errTitle.parentNode.replaceChild(ssl3ErrorTitle, errTitle);
ssl3ErrorTitle.id = "errorTitleText";
ssl3ErrorTitle.setAttribute("sslv3", "true");
errTitle = ssl3ErrorTitle;
sd.innerHTML = ssl3ShortDesc.innerHTML;
sd.querySelector('span').textContent = location.hostname;
errDesc.parentNode.replaceChild(ssl3ErrorDesc, errDesc);
ssl3ErrorDesc.id = "errorLongDesc";
ssl3ErrorDesc.querySelector('span').textContent = "ssl_error_no_cypher_overlap";
var retryBtn = document.getElementById("errorTryAgain");
retryBtn.textContent = learnMoreText.textContent;
retryBtn.setAttribute("onclick", "learnMoreSSLV3()");
}
// remove undisplayed errors to avoid bug 39098
var errContainer = document.getElementById("errorContainer");
errContainer.parentNode.removeChild(errContainer);
@ -194,7 +218,7 @@
window.addEventListener("AboutNetErrorOptions", function(evt) {
// Pinning errors are of type nssFailure2 (don't ask me why)
if (getErrorCode() == "nssFailure2") {
if (getErrorCode() == "nssFailure2" && !errTitle.hasAttribute("sslv3")) {
// TODO: and the pref is set...
var options = JSON.parse(evt.detail);
if (options && options.enabled) {
@ -324,6 +348,11 @@
return haystack.slice(-needle.length) == needle;
}
function learnMoreSSLV3() {
location.href = "https://support.mozilla.org/kb/how-resolve-sslv3-error-messages-firefox";
// Ensure users don't re-click the button:
e.target.disabled = true;
}
]]></script>
</head>
@ -356,6 +385,7 @@
<h1 id="et_cspBlocked">&cspBlocked.title;</h1>
<h1 id="et_remoteXUL">&remoteXUL.title;</h1>
<h1 id="et_corruptedContentError">&corruptedContentError.title;</h1>
<h1 id="et_ssl3">&oldSecurityProtocol.title;</h1>
</div>
<div id="errorDescriptionsContainer">
<div id="ed_generic">&generic.longDesc;</div>
@ -382,6 +412,9 @@
<div id="ed_cspBlocked">&cspBlocked.longDesc;</div>
<div id="ed_remoteXUL">&remoteXUL.longDesc;</div>
<div id="ed_corruptedContentError">&corruptedContentError.longDesc;</div>
<div id="esd_ssl3">&oldSecurityProtocol.longDesc2;</div>
<div id="ed_ssl3">&oldSecurityProtocol.advancedInfo;</div>
<div id="learn_more_ssl3">&oldSecurityProtocol.learnMore;</div>
</div>
</div>

View File

@ -15,6 +15,7 @@ browser.jar:
skin/classic/browser/aboutCertError_sectionExpanded.png
skin/classic/browser/aboutNetError.css (../shared/aboutNetError.css)
skin/classic/browser/aboutNetError_info.svg (../shared/aboutNetError_info.svg)
skin/classic/browser/aboutNetError_alert.svg (../shared/aboutNetError_alert.svg)
skin/classic/browser/aboutSocialError.css (../shared/aboutSocialError.css)
* skin/classic/browser/aboutProviderDirectory.css (../shared/aboutProviderDirectory.css)
#ifdef MOZ_SERVICES_SYNC

View File

@ -7,6 +7,7 @@ browser.jar:
skin/classic/browser/sanitizeDialog.css (sanitizeDialog.css)
skin/classic/browser/aboutNetError.css (../shared/aboutNetError.css)
skin/classic/browser/aboutNetError_info.svg (../shared/aboutNetError_info.svg)
skin/classic/browser/aboutNetError_alert.svg (../shared/aboutNetError_alert.svg)
* skin/classic/browser/aboutSessionRestore.css (aboutSessionRestore.css)
skin/classic/browser/aboutSessionRestore-window-icon.png
skin/classic/browser/aboutWelcomeBack.css (../shared/aboutWelcomeBack.css)

View File

@ -43,6 +43,10 @@ ul {
background-position: right 0;
}
#errorTitleText[sslv3=true] {
background-image: url("aboutNetError_alert.svg");
}
#errorTryAgain {
margin-top: 1.2em;
min-width: 150px

View File

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 40 40" enable-background="new 0 0 40 40" xml:space="preserve">
<g>
<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="20" y1="4" x2="20" y2="36">
<stop offset="0" style="stop-color:#E63B2E"/>
<stop offset="1" style="stop-color:#C33931"/>
</linearGradient>
<path fill="url(#SVGID_1_)" d="M13.373,4L4,13.372v13.256L13.373,36h13.255L36,26.628V13.372L26.627,4H13.373z M22.176,8.704 l-0.48,14.304h-3.424L17.76,8.704H22.176z M20,31.296c-1.44,0-2.592-1.184-2.592-2.592c0-1.44,1.152-2.592,2.592-2.592 c1.472,0,2.592,1.152,2.592,2.592C22.592,30.112,21.472,31.296,20,31.296z"/>
<linearGradient id="SVGID_2_" gradientUnits="userSpaceOnUse" x1="20" y1="-3.728928e-10" x2="20" y2="40">
<stop offset="0" style="stop-color:#E63B2E"/>
<stop offset="1" style="stop-color:#C33931"/>
</linearGradient>
<path fill="url(#SVGID_2_)" d="M28.284,0H11.716L0,11.716v16.569L11.716,40h16.569L40,28.284V11.716L28.284,0z M38,27.456 L27.456,38H12.544L2,27.456V12.544L12.544,2h14.911L38,12.544V27.456z"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@ -17,6 +17,7 @@ browser.jar:
skin/classic/browser/aboutCertError_sectionExpanded.png
skin/classic/browser/aboutNetError.css (../shared/aboutNetError.css)
skin/classic/browser/aboutNetError_info.svg (../shared/aboutNetError_info.svg)
skin/classic/browser/aboutNetError_alert.svg (../shared/aboutNetError_alert.svg)
skin/classic/browser/aboutSocialError.css (../shared/aboutSocialError.css)
* skin/classic/browser/aboutProviderDirectory.css (../shared/aboutProviderDirectory.css)
#ifdef MOZ_SERVICES_SYNC
@ -467,6 +468,7 @@ browser.jar:
skin/classic/aero/browser/aboutCertError_sectionExpanded.png
skin/classic/aero/browser/aboutNetError.css (../shared/aboutNetError.css)
skin/classic/aero/browser/aboutNetError_info.svg (../shared/aboutNetError_info.svg)
skin/classic/aero/browser/aboutNetError_alert.svg (../shared/aboutNetError_alert.svg)
skin/classic/aero/browser/aboutSocialError.css (../shared/aboutSocialError.css)
* skin/classic/aero/browser/aboutProviderDirectory.css (../shared/aboutProviderDirectory.css)
#ifdef MOZ_SERVICES_SYNC