]> source.dussan.org Git - rspamd.git/commitdiff
[Fix] Fix a bug in MIME_BAD_ATTACHMENT rule
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 18 Mar 2016 10:43:00 +0000 (10:43 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 18 Mar 2016 10:43:00 +0000 (10:43 +0000)
Issue: #561
Reported by: @moisseev

src/plugins/lua/mime_types.lua

index 0bfe42fe07576afa46b149074488c521a716d5c2..1014480a3616fb637914bdb6ccd54417a9cdbdfa 100644 (file)
@@ -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