]> source.dussan.org Git - rspamd.git/commitdiff
[Fix] Iterate over dynamic keys in fuzzy storage rspamd-3.9
authorVsevolod Stakhov <vsevolod@rspamd.com>
Tue, 24 Sep 2024 14:13:39 +0000 (15:13 +0100)
committerVsevolod Stakhov <vsevolod@rspamd.com>
Wed, 25 Sep 2024 10:46:25 +0000 (11:46 +0100)
src/fuzzy_storage.c

index 44528951113be6140a64e2230422cd25ae9d3bac..97f84e2b6b8ea46ee6be29d999df66655cba24a7 100644 (file)
@@ -2351,6 +2351,12 @@ rspamd_fuzzy_stat_to_ucl(struct rspamd_fuzzy_storage_ctx *ctx, gboolean ip_stat)
                rspamd_fuzzy_key_stat_iter(pk_iter, fuzzy_key, keys_obj, ip_stat);
        });
 
+       if (ctx->dynamic_keys) {
+               kh_foreach(ctx->dynamic_keys, pk_iter, fuzzy_key, {
+                       rspamd_fuzzy_key_stat_iter(pk_iter, fuzzy_key, keys_obj, ip_stat);
+               });
+       }
+
        ucl_object_insert_key(obj, keys_obj, "keys", 0, false);
 
        /* Now generic stats */