From: Vsevolod Stakhov Date: Fri, 18 Mar 2016 10:43:00 +0000 (+0000) Subject: [Fix] Fix a bug in MIME_BAD_ATTACHMENT rule X-Git-Tag: 1.2.0~9 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=aa5ebcb8b9d42000aa141adbfef87012aeb18c77;p=rspamd.git [Fix] Fix a bug in MIME_BAD_ATTACHMENT rule Issue: #561 Reported by: @moisseev --- diff --git a/src/plugins/lua/mime_types.lua b/src/plugins/lua/mime_types.lua index 0bfe42fe0..1014480a3 100644 --- a/src/plugins/lua/mime_types.lua +++ b/src/plugins/lua/mime_types.lua @@ -52,8 +52,8 @@ local function check_mime_type(task) local ext = string.match(filename, '%.([^.]+)$') if ext then - if settings['extension_map'] then - if ct ~= settings['extension_map'] then + if settings['extension_map'][ext] then + if ct ~= settings['extension_map'][ext] then task:insert_result(settings['symbol_attachment'], 1.0, ext) end end