mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1231312 Simplify the string in browser.properties about certificate errors sent to website owners. r=past
This commit is contained in:
parent
5eb18ec923
commit
9cfd553890
@ -3121,8 +3121,7 @@ function getDetailedCertErrorInfo(location, securityInfoAsString) {
|
|||||||
if (!securityInfoAsString)
|
if (!securityInfoAsString)
|
||||||
return "";
|
return "";
|
||||||
|
|
||||||
let details = [];
|
let certErrorDetails = location;
|
||||||
details.push(location);
|
|
||||||
|
|
||||||
const serhelper = Cc["@mozilla.org/network/serialization-helper;1"]
|
const serhelper = Cc["@mozilla.org/network/serialization-helper;1"]
|
||||||
.getService(Ci.nsISerializationHelper);
|
.getService(Ci.nsISerializationHelper);
|
||||||
@ -3132,7 +3131,7 @@ function getDetailedCertErrorInfo(location, securityInfoAsString) {
|
|||||||
let errors = Cc["@mozilla.org/nss_errors_service;1"]
|
let errors = Cc["@mozilla.org/nss_errors_service;1"]
|
||||||
.getService(Ci.nsINSSErrorsService);
|
.getService(Ci.nsINSSErrorsService);
|
||||||
let code = securityInfo.errorCode;
|
let code = securityInfo.errorCode;
|
||||||
details.push(errors.getErrorMessage(errors.getXPCOMFromNSSError(code)));
|
certErrorDetails += "\r\n\r\n" + errors.getErrorMessage(errors.getXPCOMFromNSSError(code));
|
||||||
|
|
||||||
const sss = Cc["@mozilla.org/ssservice;1"]
|
const sss = Cc["@mozilla.org/ssservice;1"]
|
||||||
.getService(Ci.nsISiteSecurityService);
|
.getService(Ci.nsISiteSecurityService);
|
||||||
@ -3143,8 +3142,15 @@ function getDetailedCertErrorInfo(location, securityInfoAsString) {
|
|||||||
Ci.nsISocketProvider.NO_PERMANENT_STORAGE : 0;
|
Ci.nsISocketProvider.NO_PERMANENT_STORAGE : 0;
|
||||||
|
|
||||||
let uri = Services.io.newURI(location, null, null);
|
let uri = Services.io.newURI(location, null, null);
|
||||||
details.push(sss.isSecureHost(sss.HEADER_HSTS, uri.host, flags));
|
|
||||||
details.push(sss.isSecureHost(sss.HEADER_HPKP, uri.host, flags));
|
let hasHSTS = sss.isSecureHost(sss.HEADER_HSTS, uri.host, flags);
|
||||||
|
let hasHPKP = sss.isSecureHost(sss.HEADER_HPKP, uri.host, flags);
|
||||||
|
certErrorDetails += "\r\n\r\n" +
|
||||||
|
gNavigatorBundle.getFormattedString("certErrorDetailsHSTS.label",
|
||||||
|
[hasHSTS]);
|
||||||
|
certErrorDetails += "\r\n" +
|
||||||
|
gNavigatorBundle.getFormattedString("certErrorDetailsKeyPinning.label",
|
||||||
|
[hasHPKP]);
|
||||||
|
|
||||||
let certChain = "";
|
let certChain = "";
|
||||||
if (securityInfo.failedCertChain) {
|
if (securityInfo.failedCertChain) {
|
||||||
@ -3155,8 +3161,12 @@ function getDetailedCertErrorInfo(location, securityInfoAsString) {
|
|||||||
certChain += getPEMString(cert);
|
certChain += getPEMString(cert);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
details.push(certChain);
|
|
||||||
return gNavigatorBundle.getFormattedString("certErrorDetails.label", details, 5);
|
certErrorDetails += "\r\n\r\n" +
|
||||||
|
gNavigatorBundle.getString("certErrorDetailsCertChain.label") +
|
||||||
|
"\r\n\r\n" + certChain;
|
||||||
|
|
||||||
|
return certErrorDetails;
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: can we pull getDERString and getPEMString in from pippki.js instead of
|
// TODO: can we pull getDERString and getPEMString in from pippki.js instead of
|
||||||
|
@ -799,13 +799,13 @@ unmuteTab.accesskey = M
|
|||||||
weakCryptoOverriding.message = %S recommends that you don't enter your password, credit card and other personal information on this website.
|
weakCryptoOverriding.message = %S recommends that you don't enter your password, credit card and other personal information on this website.
|
||||||
revokeOverride.label = Don't Trust This Website
|
revokeOverride.label = Don't Trust This Website
|
||||||
revokeOverride.accesskey = D
|
revokeOverride.accesskey = D
|
||||||
# LOCALIZATION NOTE (certErrorDetails.label): This is a text string that
|
|
||||||
# appears in the about:certerror page, so that the user can copy and send it to
|
# LOCALIZATION NOTE (certErrorDetails*.label): These are text strings that
|
||||||
# the server administrators for troubleshooting. %1$S is the visited URL, %2$S
|
# appear in the about:certerror page, so that the user can copy and send them to
|
||||||
# is the error message, %3$S is true or false, depending on whether the server
|
# the server administrators for troubleshooting.
|
||||||
# supports HSTS, %4$S is true or false, depending on whether the server
|
certErrorDetailsHSTS.label = HTTP Strict Transport Security: %S
|
||||||
# supports HPKP, %5$S is the certificate chain in PEM format.
|
certErrorDetailsKeyPinning.label = HTTP Public Key Pinning: %S
|
||||||
certErrorDetails.label = %1$S\r\n\r\n%2$S\r\n\r\nHTTP Strict Transport Security: %3$S\r\nHTTP Public Key Pinning: %4$S\r\n\r\nCertificate chain:\r\n\r\n%5$S
|
certErrorDetailsCertChain.label = Certificate chain:
|
||||||
|
|
||||||
# LOCALIZATION NOTE (tabgroups.migration.anonGroup):
|
# LOCALIZATION NOTE (tabgroups.migration.anonGroup):
|
||||||
# %S is the group number/ID
|
# %S is the group number/ID
|
||||||
|
Loading…
Reference in New Issue
Block a user