Bug 1127339 - Move SSLv3 detection out of aboutNetError.xhtml. r=gijs

This commit is contained in:
Masatoshi Kimura 2015-02-21 17:20:23 +09:00
parent c584cd0cbb
commit 8f99dc2e85
6 changed files with 16 additions and 29 deletions

View File

@ -34,3 +34,4 @@ phishingBlocked=The website at %S has been reported as a web forgery designed to
cspBlocked=This page has a content security policy that prevents it from being loaded in this way.
corruptedContentError=The page you are trying to view cannot be shown because an error in the data transmission was detected.
remoteXUL=This page uses an unsupported technology that is no longer available by default in Firefox.
sslv3Used=Firefox cannot guarantee the safety of your data on %S because it uses SSLv3, a broken security protocol.

View File

@ -156,24 +156,10 @@
errDesc.id = "errorLongDesc";
}
if (err == "nssFailure2" &&
sd.textContent.contains("ssl_error_unsupported_version")) {
var ssl3ErrorTitle = document.getElementById("et_ssl3");
var ssl3ErrorDesc = document.getElementById("ed_ssl3");
var ssl3ShortDesc = document.getElementById("esd_ssl3");
if (err == "sslv3Used") {
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_unsupported_version";
errTitle.setAttribute("sslv3", "true");
var retryBtn = document.getElementById("errorTryAgain");
retryBtn.textContent = learnMoreText.textContent;
@ -218,7 +204,7 @@
window.addEventListener("AboutNetErrorOptions", function(evt) {
// Pinning errors are of type nssFailure2
if (getErrorCode() == "nssFailure2" && !errTitle.hasAttribute("sslv3")) {
if (getErrorCode() == "nssFailure2") {
var learnMoreLink = document.getElementById("learnMoreLink");
// nssFailure2 also gets us other non-overrideable errors. Choose
// a "learn more" link based on description:
@ -391,7 +377,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>
<h1 id="et_sslv3Used">&sslv3Used.title;</h1>
</div>
<div id="errorDescriptionsContainer">
<div id="ed_generic">&generic.longDesc;</div>
@ -418,9 +404,8 @@
<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 id="ed_sslv3Used">&sslv3Used.longDesc;</div>
<div id="learn_more_ssl3">&sslv3Used.learnMore;</div>
</div>
</div>

View File

@ -34,3 +34,5 @@ phishingBlocked=The website at %S has been reported as a web forgery designed to
cspBlocked=This page has a content security policy that prevents it from being loaded in this way.
corruptedContentError=The page you are trying to view cannot be shown because an error in the data transmission was detected.
remoteXUL=This page uses an unsupported technology that is no longer available by default in Firefox.
## LOCALIZATION NOTE (oldSecurityProtocol) - Do not translate "%S".
sslv3Used=Firefox cannot guarantee the safety of your data on %S because it uses SSLv3, a broken security protocol.

View File

@ -205,11 +205,8 @@ functionality specific to firefox. -->
<!ENTITY remoteXUL.title "Remote XUL">
<!ENTITY remoteXUL.longDesc "<p><ul><li>Please contact the website owners to inform them of this problem.</li></ul></p>">
<!ENTITY oldSecurityProtocol.title "Unable to Connect Securely">
<!-- LOCALIZATION NOTE (oldSecurityProtocol.longDesc) - Do not translate the
<span id='hostname'></span>. -->
<!ENTITY oldSecurityProtocol.longDesc2 "&brandShortName; cannot guarantee the safety of your data on <span id='hostname'></span> because it uses SSLv3, a broken security protocol.">
<!-- LOCALIZATION NOTE (oldSecurityProtocol.advancedInfo) - Do not translate
the <span id='errorcode'></span>. -->
<!ENTITY oldSecurityProtocol.advancedInfo "Advanced info: <span id='errorcode'></span>">
<!ENTITY oldSecurityProtocol.learnMore "Learn More…">
<!ENTITY sslv3Used.title "Unable to Connect Securely">
<!-- LOCALIZATION NOTE (sslv3Used.advancedInfo) - Do not translate
"ssl_error_unsupported_version". -->
<!ENTITY sslv3Used.longDesc "Advanced info: ssl_error_unsupported_version">
<!ENTITY sslv3Used.learnMore "Learn More…">

View File

@ -34,3 +34,4 @@ phishingBlocked=The website at %S has been reported as a web forgery designed to
cspBlocked=This page has a content security policy that prevents it from being loaded in this way.
corruptedContentError=The page you are trying to view cannot be shown because an error in the data transmission was detected.
remoteXUL=This page uses an unsupported technology that is no longer available by default in Firefox.
sslv3Used=Firefox cannot guarantee the safety of your data on %S because it uses SSLv3, a broken security protocol.

View File

@ -33,3 +33,4 @@ phishingBlocked=The website at %S has been reported as a web forgery designed to
cspBlocked=This application tried to access a resource that has a content security policy that prevents it from being loaded in this way.
corruptedContentError=The application cannot continue loading because an error in the data transmission was detected.
remoteXUL=This application tried to use an unsupported technology that is no longer available.
sslv3Used=This application cannot guarantee the safety of your data on %S because it uses SSLv3, a broken security protocol.