mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-31 11:37:30 +09:00
Remove SSL Error Reporting telemetry
This commit is contained in:
parent
36b1662a58
commit
7b82a2ece4
15 changed files with 1 additions and 462 deletions
|
|
@ -96,11 +96,6 @@
|
|||
return (node.style.display = toggle[node.style.display]);
|
||||
}
|
||||
|
||||
function showCertificateErrorReporting() {
|
||||
// Display error reporting UI
|
||||
document.getElementById("certificateErrorReporting").style.display = "block";
|
||||
}
|
||||
|
||||
function showPrefChangeContainer() {
|
||||
const panel = document.getElementById("prefChangeContainer");
|
||||
panel.style.display = "block";
|
||||
|
|
@ -286,21 +281,6 @@
|
|||
learnMoreLink.href = "https://support.mozilla.org/kb/how-resolve-weak-crypto-error-messages-firefox";
|
||||
}
|
||||
|
||||
var options = JSON.parse(evt.detail);
|
||||
if (options && options.enabled) {
|
||||
var checkbox = document.getElementById("automaticallyReportInFuture");
|
||||
showCertificateErrorReporting();
|
||||
if (options.automatic) {
|
||||
// set the checkbox
|
||||
checkbox.checked = true;
|
||||
}
|
||||
|
||||
checkbox.addEventListener("change", function(evt) {
|
||||
var event = new CustomEvent("AboutNetErrorSetAutomatic",
|
||||
{bubbles:true, detail:evt.target.checked});
|
||||
document.dispatchEvent(event);
|
||||
}, false);
|
||||
}
|
||||
const hasPrefStyleError = [
|
||||
"interrupted", // This happens with subresources that are above the max tls
|
||||
"SSL_ERROR_PROTOCOL_VERSION_ALERT",
|
||||
|
|
@ -370,25 +350,6 @@
|
|||
|
||||
document.getElementById("learnMoreContainer").style.display = "block";
|
||||
|
||||
let checkbox = document.getElementById("automaticallyReportInFuture");
|
||||
checkbox.addEventListener("change", function({target: {checked}}) {
|
||||
document.dispatchEvent(new CustomEvent("AboutNetErrorSetAutomatic", {
|
||||
detail: checked,
|
||||
bubbles: true
|
||||
}));
|
||||
});
|
||||
|
||||
addEventListener("AboutNetErrorOptions", function(event) {
|
||||
var options = JSON.parse(event.detail);
|
||||
if (options && options.enabled) {
|
||||
// Display error reporting UI
|
||||
document.getElementById("certificateErrorReporting").style.display = "block";
|
||||
|
||||
// set the checkbox
|
||||
checkbox.checked = !!options.automatic;
|
||||
}
|
||||
}, true, true);
|
||||
|
||||
let event = new CustomEvent("AboutNetErrorLoad", {bubbles:true});
|
||||
document.getElementById("advancedButton").dispatchEvent(event);
|
||||
|
||||
|
|
@ -631,10 +592,6 @@
|
|||
<!-- Long Description (Note: See netError.dtd for used XHTML tags) -->
|
||||
<div id="errorLongDesc" />
|
||||
|
||||
<div id="learnMoreContainer">
|
||||
<p><a href="https://support.mozilla.org/kb/what-does-your-connection-is-not-secure-mean" id="learnMoreLink" target="new">&errorReporting.learnMore;</a></p>
|
||||
</div>
|
||||
|
||||
<div id="prefChangeContainer" class="button-container">
|
||||
<p>&prefReset.longDesc;</p>
|
||||
<button id="prefResetButton" class="primary" autocomplete="off">&prefReset.label;</button>
|
||||
|
|
@ -652,15 +609,6 @@
|
|||
<button id="errorTryAgain" class="primary" autocomplete="off" onclick="retryThis(this);">&retry.label;</button>
|
||||
</div>
|
||||
|
||||
<!-- UI for option to report certificate errors to Mozilla. Removed on
|
||||
init for other error types .-->
|
||||
<div id="certificateErrorReporting">
|
||||
<p class="toggle-container-with-text">
|
||||
<input type="checkbox" id="automaticallyReportInFuture" />
|
||||
<label for="automaticallyReportInFuture" id="automaticallyReportInFuture">&errorReporting.automatic2;</label>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div id="advancedPanelContainer">
|
||||
<div id="weakCryptoAdvancedPanel" class="advanced-panel">
|
||||
<div id="weakCryptoAdvancedDescription">
|
||||
|
|
|
|||
|
|
@ -2754,8 +2754,6 @@ var BrowserOnClick = {
|
|||
mm.addMessageListener("Browser:OpenCaptivePortalPage", this);
|
||||
mm.addMessageListener("Browser:SiteBlockedError", this);
|
||||
mm.addMessageListener("Browser:EnableOnlineMode", this);
|
||||
mm.addMessageListener("Browser:SendSSLErrorReport", this);
|
||||
mm.addMessageListener("Browser:SetSSLErrorReportAuto", this);
|
||||
mm.addMessageListener("Browser:ResetSSLPreferences", this);
|
||||
mm.addMessageListener("Browser:SSLErrorReportTelemetry", this);
|
||||
mm.addMessageListener("Browser:OverrideWeakCrypto", this);
|
||||
|
|
@ -2770,8 +2768,6 @@ var BrowserOnClick = {
|
|||
mm.removeMessageListener("Browser:CertExceptionError", this);
|
||||
mm.removeMessageListener("Browser:SiteBlockedError", this);
|
||||
mm.removeMessageListener("Browser:EnableOnlineMode", this);
|
||||
mm.removeMessageListener("Browser:SendSSLErrorReport", this);
|
||||
mm.removeMessageListener("Browser:SetSSLErrorReportAuto", this);
|
||||
mm.removeMessageListener("Browser:ResetSSLPreferences", this);
|
||||
mm.removeMessageListener("Browser:SSLErrorReportTelemetry", this);
|
||||
mm.removeMessageListener("Browser:OverrideWeakCrypto", this);
|
||||
|
|
@ -2813,11 +2809,6 @@ var BrowserOnClick = {
|
|||
msg.target.reload();
|
||||
}
|
||||
break;
|
||||
case "Browser:SendSSLErrorReport":
|
||||
this.onSSLErrorReport(msg.target,
|
||||
msg.data.uri,
|
||||
msg.data.securityInfo);
|
||||
break;
|
||||
case "Browser:ResetSSLPreferences":
|
||||
for (let prefName of PREF_SSL_IMPACT) {
|
||||
Services.prefs.clearUserPref(prefName);
|
||||
|
|
@ -2851,20 +2842,7 @@ var BrowserOnClick = {
|
|||
},
|
||||
|
||||
onSSLErrorReport: function(browser, uri, securityInfo) {
|
||||
if (!Services.prefs.getBoolPref("security.ssl.errorReporting.enabled")) {
|
||||
Cu.reportError("User requested certificate error report sending, but certificate error reporting is disabled");
|
||||
return;
|
||||
}
|
||||
|
||||
let serhelper = Cc["@mozilla.org/network/serialization-helper;1"]
|
||||
.getService(Ci.nsISerializationHelper);
|
||||
let transportSecurityInfo = serhelper.deserializeObject(securityInfo);
|
||||
transportSecurityInfo.QueryInterface(Ci.nsITransportSecurityInfo)
|
||||
|
||||
let errorReporter = Cc["@mozilla.org/securityreporter;1"]
|
||||
.getService(Ci.nsISecurityReporter);
|
||||
errorReporter.reportTLSError(transportSecurityInfo,
|
||||
uri.host, uri.port);
|
||||
Cu.reportError("User requested certificate error report sending, but certificate error reporting is disabled");
|
||||
},
|
||||
|
||||
onCertError: function (browser, elementId, isTopFrame, location, securityInfoAsString) {
|
||||
|
|
|
|||
|
|
@ -385,18 +385,6 @@ var AboutNetAndCertErrorListener = {
|
|||
let ownerDoc = originalTarget.ownerDocument;
|
||||
ClickEventHandler.onCertError(originalTarget, ownerDoc);
|
||||
}
|
||||
|
||||
let automatic = Services.prefs.getBoolPref("security.ssl.errorReporting.automatic");
|
||||
content.dispatchEvent(new content.CustomEvent("AboutNetErrorOptions", {
|
||||
detail: JSON.stringify({
|
||||
enabled: Services.prefs.getBoolPref("security.ssl.errorReporting.enabled"),
|
||||
changedCertPrefs: this.changedCertPrefs(),
|
||||
automatic: automatic
|
||||
})
|
||||
}));
|
||||
|
||||
sendAsyncMessage("Browser:SSLErrorReportTelemetry",
|
||||
{reportStatus: TLS_ERROR_REPORT_TELEMETRY_UI_SHOWN});
|
||||
},
|
||||
|
||||
openCaptivePortalPage: function(evt) {
|
||||
|
|
@ -408,22 +396,6 @@ var AboutNetAndCertErrorListener = {
|
|||
sendAsyncMessage("Browser:ResetSSLPreferences");
|
||||
},
|
||||
|
||||
onSetAutomatic: function(evt) {
|
||||
sendAsyncMessage("Browser:SetSSLErrorReportAuto", {
|
||||
automatic: evt.detail
|
||||
});
|
||||
|
||||
// if we're enabling reports, send a report for this failure
|
||||
if (evt.detail) {
|
||||
let {host, port} = content.document.mozDocumentURIIfNotForErrorPages;
|
||||
sendAsyncMessage("Browser:SendSSLErrorReport", {
|
||||
uri: { host, port },
|
||||
securityInfo: getSerializedSecurityInfo(docShell),
|
||||
});
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
onOverride: function(evt) {
|
||||
let {host, port} = content.document.mozDocumentURIIfNotForErrorPages;
|
||||
sendAsyncMessage("Browser:OverrideWeakCrypto", { uri: {host, port} });
|
||||
|
|
|
|||
|
|
@ -297,7 +297,6 @@
|
|||
@RESPATH@/components/toolkit_finalizationwitness.xpt
|
||||
@RESPATH@/components/toolkit_formautofill.xpt
|
||||
@RESPATH@/components/toolkit_osfile.xpt
|
||||
@RESPATH@/components/toolkit_securityreporter.xpt
|
||||
@RESPATH@/components/toolkit_perfmonitoring.xpt
|
||||
@RESPATH@/components/toolkit_xulstore.xpt
|
||||
@RESPATH@/components/toolkitprofile.xpt
|
||||
|
|
@ -584,10 +583,6 @@
|
|||
@RESPATH@/components/PrivateBrowsing.manifest
|
||||
@RESPATH@/components/PrivateBrowsingTrackingProtectionWhitelist.js
|
||||
|
||||
; Security Reports
|
||||
@RESPATH@/components/SecurityReporter.manifest
|
||||
@RESPATH@/components/SecurityReporter.js
|
||||
|
||||
; ANGLE GLES-on-D3D rendering library
|
||||
#ifdef MOZ_ANGLE_RENDERER
|
||||
@BINPATH@/libEGL.dll
|
||||
|
|
|
|||
|
|
@ -178,9 +178,6 @@ was trying to connect. -->
|
|||
|
||||
<!ENTITY securityOverride.exceptionButtonLabel "Add Exception…">
|
||||
|
||||
<!ENTITY errorReporting.automatic2 "Report errors like this to help Mozilla identify and block malicious sites">
|
||||
<!ENTITY errorReporting.learnMore "Learn more…">
|
||||
|
||||
<!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>">
|
||||
|
||||
|
|
|
|||
|
|
@ -226,16 +226,6 @@ functionality specific to firefox. -->
|
|||
<button id='exceptionDialogButton'>&securityOverride.exceptionButtonLabel;</button>
|
||||
">
|
||||
|
||||
<!ENTITY errorReporting.title "Report this error">
|
||||
<!ENTITY errorReporting.longDesc "Reporting the address and certificate information for <span id='hostname'></span> will help us identify and block malicious sites. Thanks for helping create a safer web!">
|
||||
<!ENTITY errorReporting.automatic "Automatically report errors in the future">
|
||||
<!ENTITY errorReporting.automatic2 "Report errors like this to help Mozilla identify and block malicious sites">
|
||||
<!ENTITY errorReporting.learnMore "Learn more…">
|
||||
<!ENTITY errorReporting.sending "Sending report">
|
||||
<!ENTITY errorReporting.sent "Report sent">
|
||||
<!ENTITY errorReporting.report "Report">
|
||||
<!ENTITY errorReporting.tryAgain "Try again">
|
||||
|
||||
<!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>">
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue