mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-08 00:38:39 +09:00
Update HSTS preload list generation script
Previous behavior: if an entry was in the previously-used list, and there would be an error connecting to or processing the host, it would adopt it using the previous status, with a new minimum required max age TTL. New behavior: if an entry is in the previously-used list, and there is an error connecting to or processing the host, it will be dropped from the preload list. The old behavior would allow entries to persist on the HSTS preload list when they drop off the 'net. Considering domain churn, it would cause issues for new owners for having a persisted HSTS entry preloaded in the browser. Bonus: it keeps our HSTS preload list lean.
This commit is contained in:
parent
d0a61d943f
commit
4752033ff0
1 changed files with 4 additions and 5 deletions
|
|
@ -261,16 +261,15 @@ function output(sortedStatuses, currentList) {
|
|||
|
||||
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 don't remove it from the list
|
||||
// (given that it was already on the list).
|
||||
// sending an HSTS header), be safe and remove it from the list
|
||||
// (preventing stale entries from accumulating).
|
||||
if (status.error != ERROR_NONE &&
|
||||
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 + " - using previous status on list\n");
|
||||
dump("INFO: error connecting to or processing " + status.name + " - dropping from list\n");
|
||||
writeTo(status.name + ": " + errorToString(status) + "\n", eos);
|
||||
status.maxAge = MINIMUM_REQUIRED_MAX_AGE;
|
||||
status.includeSubdomains = currentList[status.name];
|
||||
status.maxAge = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue