bug 1401796 - fix HSTS preload script to keep preexisting hosts if there was a connection error r=jcj DONTBUILD NPOTB

Bug 1255425 changed an 'of' to an 'in', which caused the code that would keep
preexisting entries on the preload list if there was a connection error to loop
over the indices in the array and not the values themselves. Thanks, JavaScript.

MozReview-Commit-ID: DvVWhpImp8n

--HG--
extra : rebase_source : 149c8d0fb46d3b71a9de19aaedfb5e0dd5b9a460
This commit is contained in:
David Keeler 2017-09-25 11:00:21 -07:00
parent 43b9ff721e
commit 4c42c44c85

View File

@ -250,7 +250,7 @@ function output(sortedStatuses, currentList) {
writeTo(HEADER, fos);
writeTo(getExpirationTimeString(), fos);
for (let status in sortedStatuses) {
for (let status of 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).