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

index 3064d45a08fdf3fad60edee250fe8fc639143723..f21992a94d8a0af05967b6eb6b1a7e250370319e 100644 (file)
@@ -2475,6 +2475,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 */