aboutsummaryrefslogtreecommitdiffstats
path: root/lualib
diff options
context:
space:
mode:
authorCarsten Rosenberg <c.rosenberg@heinlein-support.de>2019-01-19 18:37:35 +0100
committerCarsten Rosenberg <c.rosenberg@heinlein-support.de>2019-01-19 18:37:35 +0100
commitfdce734bca270cb4474cf687cccdd0b2f03c09c7 (patch)
treee9ba566ed7df9af3f77f5e3d3277f7817671e0d0 /lualib
parent4b444125120a088765a146c4e42fed29f6867c50 (diff)
downloadrspamd-fdce734bca270cb4474cf687cccdd0b2f03c09c7.tar.gz
rspamd-fdce734bca270cb4474cf687cccdd0b2f03c09c7.zip
[Fix] lua_scanners - actions and symbol_fail
Diffstat (limited to 'lualib')
-rw-r--r--lualib/lua_scanners/common.lua5
1 files changed, 2 insertions, 3 deletions
diff --git a/lualib/lua_scanners/common.lua b/lualib/lua_scanners/common.lua
index de5f77db9..0eeb44bc3 100644
--- a/lualib/lua_scanners/common.lua
+++ b/lualib/lua_scanners/common.lua
@@ -66,16 +66,15 @@ local function yield_result(task, rule, vname, dyn_weight, is_fail)
local patterns
local symbol
+ -- This should be more generic
if not is_fail then
patterns = rule.patterns
symbol = rule.symbol
if not dyn_weight then dyn_weight = 1.0 end
- lua_util.debugm(rule.name, task, '%s: no fail: %s',rule.log_prefix, symbol)
elseif is_fail == 'fail' then
patterns = rule.patterns_fail
symbol = rule.symbol_fail
dyn_weight = 0.0
- lua_util.debugm(rule.name, task, '%s: FAIL: %s',rule.log_prefix, symbol)
end
if type(vname) == 'string' then
@@ -103,7 +102,7 @@ local function yield_result(task, rule, vname, dyn_weight, is_fail)
end
end
end
- if rule.action then
+ if rule.action and is_fail ~= 'fail' then
if type(vname) == 'table' then
if all_whitelisted then return end
vname = table.concat(vname, '; ')