From 111ccfd146c2199e9adca143e2f2fa7836c90f36 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Wed, 3 Sep 2014 18:36:38 +0100 Subject: [PATCH] Fix multimap. --- src/plugins/lua/multimap.lua | 8 ++++---- 1 file 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 -- 2.39.5