From: Carsten Rosenberg Date: Thu, 4 Nov 2021 18:28:48 +0000 (+0100) Subject: [Fix] lua_cfg_transform - actions without score (discard) X-Git-Tag: 3.2~297^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=ea6276bce599657d76fb507c0e48ea9b64c2748c;p=rspamd.git [Fix] lua_cfg_transform - actions without score (discard) --- diff --git a/lualib/lua_cfg_transform.lua b/lualib/lua_cfg_transform.lua index fca4c72c2..6fec243e9 100644 --- a/lualib/lua_cfg_transform.lua +++ b/lualib/lua_cfg_transform.lua @@ -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