diff options
author | wolfbeast <mcwerewolf@wolfbeast.com> | 2020-02-01 01:37:52 +0000 |
---|---|---|
committer | wolfbeast <mcwerewolf@wolfbeast.com> | 2020-02-01 01:37:52 +0000 |
commit | 33ad27614a446844b093b851119853a7f64f8a01 (patch) | |
tree | feb02734459baa068b1aba52359c5359ced1b660 /security/manager/tools/getHSTSPreloadList.js | |
parent | 229f8412959a9480a9fa1784d6619aa5e97320c3 (diff) | |
download | UXP-33ad27614a446844b093b851119853a7f64f8a01.tar UXP-33ad27614a446844b093b851119853a7f64f8a01.tar.gz UXP-33ad27614a446844b093b851119853a7f64f8a01.tar.lz UXP-33ad27614a446844b093b851119853a7f64f8a01.tar.xz UXP-33ad27614a446844b093b851119853a7f64f8a01.zip |
Issue #447 - Update HSTS preload list & reduce debug spew
Commented out spewing dump() statements in loops. With the ever growing
HSTS list it takes too much time and is pointless to display.
Diffstat (limited to 'security/manager/tools/getHSTSPreloadList.js')
-rw-r--r-- | security/manager/tools/getHSTSPreloadList.js | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/security/manager/tools/getHSTSPreloadList.js b/security/manager/tools/getHSTSPreloadList.js index 42d4da067..cf5614651 100644 --- a/security/manager/tools/getHSTSPreloadList.js +++ b/security/manager/tools/getHSTSPreloadList.js @@ -275,6 +275,7 @@ function output(sortedStatuses, currentList) { writeTo(getExpirationTimeString(), fos); writeTo(PREFIX, fos); + dump("INFO: Removing error-state sites from list\n"); for (let status in sortedStatuses) { // If we've encountered an error for this entry (other than the site not // sending an HSTS header), be safe and remove it from the list @@ -283,28 +284,30 @@ function output(sortedStatuses, currentList) { status.error != ERROR_NO_HSTS_HEADER && status.error != ERROR_MAX_AGE_TOO_LOW && status.name in currentList) { - dump("INFO: error connecting to or processing " + status.name + " - dropping from list\n"); + // dump("INFO: error connecting to or processing " + status.name + " - dropping from list\n"); writeTo(status.name + ": " + errorToString(status) + "\n", eos); status.maxAge = 0; } } // Filter out entries we aren't including. + dump("INFO: Filtering out entries we aren't including...\n"); var includedStatuses = sortedStatuses.filter(function (status) { if (status.maxAge < MINIMUM_REQUIRED_MAX_AGE && !status.forceInclude) { - dump("INFO: " + status.name + " NOT ON the preload list\n"); + // dump("INFO: " + status.name + " NOT ON the preload list\n"); writeTo(status.name + ": " + errorToString(status) + "\n", eos); return false; } - dump("INFO: " + status.name + " ON the preload list\n"); + // dump("INFO: " + status.name + " ON the preload list\n"); if (status.forceInclude && status.error != ERROR_NONE) { writeTo(status.name + ": " + errorToString(status) + " (error " + "ignored - included regardless)\n", eos); } return true; }); - + + dump("INFO: Writing statuses to file...\n"); for (var status of includedStatuses) { writeEntry(status, fos); } |