]> source.dussan.org Git - rspamd.git/commitdiff
[Fix] lua_cfg_transform - actions without score (discard) 3959/head
authorCarsten Rosenberg <c.rosenberg@heinlein-support.de>
Thu, 4 Nov 2021 18:28:48 +0000 (19:28 +0100)
committerCarsten Rosenberg <c.rosenberg@heinlein-support.de>
Thu, 4 Nov 2021 18:28:48 +0000 (19:28 +0100)
lualib/lua_cfg_transform.lua

index fca4c72c22a06a5c98da06c51173836883dc3d64..6fec243e96c27f0543ebe312bcdbfbd6957c2e39 100644 (file)
@@ -374,7 +374,9 @@ return function(cfg)
             not cfg.actions['accept'] then
       for _,d in ipairs(actions_defs) do
         if cfg.actions[d] then
-          if type(cfg.actions[d]) ~= 'number' then
+          if type(cfg.actions[d]) ~= 'table' then
+            break
+          elseif type(cfg.actions[d]) ~= 'number' then
             cfg.actions[d] = nil
           elseif cfg.actions[d] < 0 then
             cfg.actions['no_action'] = cfg.actions[d] - 0.001