aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2016-08-12 11:20:41 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2016-08-12 11:23:34 +0100
commit888dee57cfcd029a07ac0ebac29bd2e7347ecc00 (patch)
treee5c9bc7115e3a8568757216b7f93e7bdeb9cafad
parentca2374d88c09759f2a46e68801e5eb557eee7d3b (diff)
downloadrspamd-888dee57cfcd029a07ac0ebac29bd2e7347ecc00.tar.gz
rspamd-888dee57cfcd029a07ac0ebac29bd2e7347ecc00.zip
[Fix] Fix multimap content filters
-rw-r--r--src/plugins/lua/multimap.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/plugins/lua/multimap.lua b/src/plugins/lua/multimap.lua
index e40cb01cc..92fbe9e4c 100644
--- a/src/plugins/lua/multimap.lua
+++ b/src/plugins/lua/multimap.lua
@@ -197,7 +197,7 @@ local function apply_filename_filter(filter, fn, r)
return fn
end
-local function apply_content_filter(filter, r)
+local function apply_content_filter(task, filter, r)
if filter == 'body' then
return {task:get_rawbody()}
elseif filter == 'full' then
@@ -347,7 +347,7 @@ local function multimap_callback(task, rule)
local function rule_callback(result)
if result then
local res,symbol,score = parse_ret(result)
- if symbol then
+ if symbol and r['symbols_set'] then
if not r['symbols_set'][symbol] then
rspamd_logger.infox(task, 'symbol %s is not registered for map %s, ' ..
'replace it with just %s',
@@ -417,7 +417,7 @@ local function multimap_callback(task, rule)
local data = {}
if r['filter'] then
- data = apply_content_filter(r['filter'], r)
+ data = apply_content_filter(task, r['filter'], r)
else
data = {task:get_content()}
end