diff options
author | Matt A. Tobin <email@mattatobin.com> | 2018-02-02 09:21:33 -0500 |
---|---|---|
committer | Matt A. Tobin <email@mattatobin.com> | 2018-02-02 09:21:33 -0500 |
commit | 9627f18cebab38cdfe45592d83371ee7bbc62cfa (patch) | |
tree | 9ac98ca9a764666bd0edd4cfd59ae970705b98a3 /browser | |
parent | c28c5b704fb3f3af6e7846abd73f63da1e35921f (diff) | |
download | UXP-9627f18cebab38cdfe45592d83371ee7bbc62cfa.tar UXP-9627f18cebab38cdfe45592d83371ee7bbc62cfa.tar.gz UXP-9627f18cebab38cdfe45592d83371ee7bbc62cfa.tar.lz UXP-9627f18cebab38cdfe45592d83371ee7bbc62cfa.tar.xz UXP-9627f18cebab38cdfe45592d83371ee7bbc62cfa.zip |
Remove kinto client, Firefox kinto storage adapter, blocklist update client and integration with sync, OneCRL and the custom time check for derives system time.
Diffstat (limited to 'browser')
-rw-r--r-- | browser/base/content/content.js | 43 | ||||
-rw-r--r-- | browser/locales/en-US/chrome/overrides/netError.dtd | 2 |
2 files changed, 21 insertions, 24 deletions
diff --git a/browser/base/content/content.js b/browser/base/content/content.js index 658d2014d..8d6f0745e 100644 --- a/browser/base/content/content.js +++ b/browser/base/content/content.js @@ -315,29 +315,26 @@ var AboutNetAndCertErrorListener = { case MOZILLA_PKIX_ERROR_NOT_YET_VALID_CERTIFICATE: case MOZILLA_PKIX_ERROR_NOT_YET_VALID_ISSUER_CERTIFICATE: - // use blocklist stats if available - if (Services.prefs.getPrefType(PREF_BLOCKLIST_CLOCK_SKEW_SECONDS)) { - let difference = Services.prefs.getIntPref(PREF_BLOCKLIST_CLOCK_SKEW_SECONDS); - - // if the difference is more than a day - if (Math.abs(difference) > 60 * 60 * 24) { - let formatter = new Intl.DateTimeFormat(); - let systemDate = formatter.format(new Date()); - // negative difference means local time is behind server time - let actualDate = formatter.format(new Date(Date.now() - difference * 1000)); - - content.document.getElementById("wrongSystemTime_URL") - .textContent = content.document.location.hostname; - content.document.getElementById("wrongSystemTime_systemDate") - .textContent = systemDate; - content.document.getElementById("wrongSystemTime_actualDate") - .textContent = actualDate; - - content.document.getElementById("errorShortDesc") - .style.display = "none"; - content.document.getElementById("wrongSystemTimePanel") - .style.display = "block"; - } + let appBuildId = Services.appinfo.appBuildID; + let year = parseInt(appBuildID.substr(0, 4), 10); + let month = parseInt(appBuildID.substr(4, 2), 10) - 1; + let day = parseInt(appBuildID.substr(6, 2), 10); + let buildDate = new Date(year, month, day); + let systemDate = new Date(); + + // if the difference is more than a day + if (buildDate > systemDate) { + let formatter = new Intl.DateTimeFormat(); + + content.document.getElementById("wrongSystemTime_URL") + .textContent = content.document.location.hostname; + content.document.getElementById("wrongSystemTime_systemDate") + .textContent = formatter.format(systemDate); + + content.document.getElementById("errorShortDesc") + .style.display = "none"; + content.document.getElementById("wrongSystemTimePanel") + .style.display = "block"; } learnMoreLink.href = baseURL + "time-errors"; break; diff --git a/browser/locales/en-US/chrome/overrides/netError.dtd b/browser/locales/en-US/chrome/overrides/netError.dtd index 30dd2346a..92db8ee3a 100644 --- a/browser/locales/en-US/chrome/overrides/netError.dtd +++ b/browser/locales/en-US/chrome/overrides/netError.dtd @@ -199,7 +199,7 @@ was trying to connect. --> <!-- LOCALIZATION NOTE (certerror.wrongSystemTime) - The <span id='..' /> tags will be injected with actual values, please leave them unchanged. --> -<!ENTITY certerror.wrongSystemTime "<p>A secure connection to <span id='wrongSystemTime_URL'/> isn’t possible because your clock appears to show the wrong time.</p> <p>Your computer thinks it is <span id='wrongSystemTime_systemDate'/>, when it should be <span id='wrongSystemTime_actualDate'/>. To fix this problem, change your date and time settings to match the correct time.</p>"> +<!ENTITY certerror.wrongSystemTime "<p>&brandShortName; did not connect to <span id='wrongSystemTimeWithoutReference_URL'/> because your computer’s clock appears to show the wrong time and this is preventing a secure connection.</p> <p>Your computer is set to <span id='wrongSystemTimeWithoutReference_systemDate'/>. To fix this problem, change your date and time settings to match the correct time.</p>"> <!ENTITY certerror.pagetitle1 "Insecure Connection"> <!ENTITY certerror.whatShouldIDo.badStsCertExplanation "This site uses HTTP |