Skip to content

Commit

Permalink
Bug 1127339 - Move SSLv3 detection out of aboutNetError.xhtml. r=gijs
Browse files Browse the repository at this point in the history
  • Loading branch information
vyv03354 committed Feb 21, 2015
1 parent 26fbed8 commit dd73360
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 29 deletions.
1 change: 1 addition & 0 deletions b2g/locales/en-US/chrome/overrides/appstrings.properties
Expand Up @@ -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.
27 changes: 6 additions & 21 deletions browser/base/content/aboutNetError.xhtml
Expand Up @@ -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;
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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>
Expand All @@ -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>

Expand Down
2 changes: 2 additions & 0 deletions browser/locales/en-US/chrome/overrides/appstrings.properties
Expand Up @@ -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.
13 changes: 5 additions & 8 deletions browser/locales/en-US/chrome/overrides/netError.dtd
Expand Up @@ -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…">
1 change: 1 addition & 0 deletions mobile/locales/en-US/overrides/appstrings.properties
Expand Up @@ -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.
Expand Up @@ -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.

0 comments on commit dd73360

Please sign in to comment.