From: Vsevolod Stakhov Date: Wed, 3 Sep 2014 17:36:38 +0000 (+0100) Subject: Fix multimap. X-Git-Tag: 0.7.0~43^2~3 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=111ccfd146c2199e9adca143e2f2fa7836c90f36;p=rspamd.git Fix multimap. --- 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