From fdce734bca270cb4474cf687cccdd0b2f03c09c7 Mon Sep 17 00:00:00 2001 From: Carsten Rosenberg Date: Sat, 19 Jan 2019 18:37:35 +0100 Subject: [PATCH] [Fix] lua_scanners - actions and symbol_fail --- lualib/lua_scanners/common.lua | 5 ++--- 1 file 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, '; ') -- 2.39.5