diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2021-11-04 20:18:47 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-04 20:18:47 +0000 |
commit | b248bd715a92e93cfbd97bb80c12cf1375f9c014 (patch) | |
tree | 5a08fc8ccd48c41fd76c31360c310ce9c656807d /lualib | |
parent | f013732a5102e3aebb37e5163c427a8e72657807 (diff) | |
parent | ea6276bce599657d76fb507c0e48ea9b64c2748c (diff) | |
download | rspamd-b248bd715a92e93cfbd97bb80c12cf1375f9c014.tar.gz rspamd-b248bd715a92e93cfbd97bb80c12cf1375f9c014.zip |
Merge pull request #3959 from HeinleinSupport/fix/lua_cfg_transform
[Fix] lua_cfg_transform - actions without score (discard)
Diffstat (limited to 'lualib')
-rw-r--r-- | lualib/lua_cfg_transform.lua | 4 |
1 files changed, 3 insertions, 1 deletions
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 |