aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2014-09-03 18:36:38 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2014-09-03 18:36:38 +0100
commit111ccfd146c2199e9adca143e2f2fa7836c90f36 (patch)
treed91338b2f82841646aa407c7d0fec4c9439b6a53
parent7e154f7d5410f7bdae4021f202f40e68c9ea151e (diff)
downloadrspamd-111ccfd146c2199e9adca143e2f2fa7836c90f36.tar.gz
rspamd-111ccfd146c2199e9adca143e2f2fa7836c90f36.zip
Fix multimap.
-rw-r--r--src/plugins/lua/multimap.lua8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/plugins/lua/multimap.lua b/src/plugins/lua/multimap.lua
index 512232c76..58606692f 100644
--- a/src/plugins/lua/multimap.lua
+++ b/src/plugins/lua/multimap.lua
@@ -36,12 +36,12 @@ local function check_multimap(task)
end
end
elseif rule['type'] == 'header' then
- local headers = task:get_message():get_header(rule['header'])
+ local headers = task:get_header_full(rule['header'])
if headers then
for _,hv in ipairs(headers) do
if rule['pattern'] then
-- extract a part from header
- local _,_,ext = string.find(hv, rule['pattern'])
+ local _,_,ext = string.find(hv['decoded'], rule['pattern'])
if ext then
if rule['cdb'] then
if rule['hash']:lookup(ext) then
@@ -55,11 +55,11 @@ local function check_multimap(task)
end
else
if rule['cdb'] then
- if rule['hash']:lookup(hv) then
+ if rule['hash']:lookup(hv['decoded']) then
task:insert_result(rule['symbol'], 1)
end
else
- if rule['hash']:get_key(hv) then
+ if rule['hash']:get_key(hv['decoded']) then
task:insert_result(rule['symbol'], 1)
end
end