]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
[Fix] Allow to disable certain actions by assigning null to them
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 22 Mar 2018 11:02:58 +0000 (11:02 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 22 Mar 2018 11:02:58 +0000 (11:02 +0000)
lualib/lua_cfg_transform.lua

index 60e2eb87162cacb8eb394c28cca410a27d49ff8e..aa5e126241b85a1c433b795cd3b88848d536d710 100644 (file)
@@ -268,7 +268,7 @@ return function(cfg)
     if not cfg.actions['no action'] and not cfg.actions['no_action'] and
         not cfg.actions['accept'] then
       for _,d in ipairs(actions_defs) do
-        if cfg.actions[d] then
+        if cfg.actions[d] and type(cfg.actions[d]) == 'number' then
           if cfg.actions[d] < 0 then
             cfg.actions['no action'] = cfg.actions[d] - 0.001
             logger.infox('set no action score to: %s, as action %s has negative score',