From aa5ebcb8b9d42000aa141adbfef87012aeb18c77 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Fri, 18 Mar 2016 10:43:00 +0000 Subject: [PATCH] [Fix] Fix a bug in MIME_BAD_ATTACHMENT rule Issue: #561 Reported by: @moisseev --- src/plugins/lua/mime_types.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 -- 2.39.5