mirror of
https://github.com/moparisthebest/wget
synced 2024-07-03 16:38:41 -04:00
Fix HSTS merge bug
* src/hsts.c (hsts_store_merge): call hsts_new_entry() if the entry does not exist in the database. When merging the existing HSTS database on disk with the one on memory, the entries that were on disk but not on memory were ignored. Thus, only the existing entries were merged. This behavior was only triggered when more than one Wget processes were using the same HSTS database simultaneously. This commit fixes the bug by adding the new entries to the on-memory database if they were not found there.
This commit is contained in:
parent
1e7ccfe275
commit
077e897819
@ -258,6 +258,8 @@ hsts_store_merge (hsts_store_t store,
|
|||||||
|
|
||||||
success = true;
|
success = true;
|
||||||
}
|
}
|
||||||
|
else if (!khi)
|
||||||
|
success = hsts_new_entry (store, host, port, created, max_age, include_subdomains);
|
||||||
|
|
||||||
return success;
|
return success;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user