>From f8ece3df88bdc3dad935f990f7de0f13db884d4d Mon Sep 17 00:00:00 2001 From: Ander Juaristi Date: Wed, 7 Oct 2015 21:25:41 +0200 Subject: [PATCH 2/2] 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. --- src/hsts.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/hsts.c b/src/hsts.c index c7339b8..a92ec67 100644 --- a/src/hsts.c +++ b/src/hsts.c @@ -261,6 +261,8 @@ hsts_store_merge (hsts_store_t store, success = true; } + else if (!khi) + success = hsts_new_entry (store, host, port, created, max_age, include_subdomains); return success; } -- 1.9.1