commit 860079f: [Minor] Fix flags stat

Vsevolod Stakhov vsevolod at rspamd.com
Fri May 12 08:49:04 UTC 2023


Author: Vsevolod Stakhov
Date: 2023-05-12 09:45:08 +0100
URL: https://github.com/rspamd/rspamd/commit/860079f690c8b831eece10e303ca6d568970dc4e (HEAD -> master)

[Minor] Fix flags stat

---
 lualib/rspamadm/fuzzy_stat.lua | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/lualib/rspamadm/fuzzy_stat.lua b/lualib/rspamadm/fuzzy_stat.lua
index 9e382c06f..47b780a09 100644
--- a/lualib/rspamadm/fuzzy_stat.lua
+++ b/lualib/rspamadm/fuzzy_stat.lua
@@ -39,6 +39,13 @@ local function add_data(target, src)
         if not target['ips'][ip] then target['ips'][ip] = {} end
         add_data(target['ips'][ip], st)
       end
+    elseif k == 'flags' then
+      if not target['flags'] then target['flags'] = {} end
+      -- Iterate over Flags
+      for flag,st in pairs(v) do
+        if not target['flags'][flag] then target['flags'][flag] = {} end
+        add_data(target['flags'][flag], st)
+      end
     elseif k == 'keypair' then
       if type(v.extensions) == 'table' then
         if type(v.extensions.name) == 'string' then


More information about the Commits mailing list