]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] mime_types: Skip extensions matching 2784/head
authorAlexander Moisseev <moiseev@mezonplus.ru>
Fri, 8 Mar 2019 12:06:13 +0000 (15:06 +0300)
committerAlexander Moisseev <moiseev@mezonplus.ru>
Fri, 8 Mar 2019 12:06:13 +0000 (15:06 +0300)
if extension of the file inside archive is not bad

src/plugins/lua/mime_types.lua

index 98acd463f1dea58c3223fda4fda360595a24e3af..589f82515d4a53db686b4ac6454b26ee2902d465 100644 (file)
@@ -1016,8 +1016,9 @@ local function check_mime_type(task)
               if ext2 then
                 local enc_ext = gen_extension(fl[1].name)
 
-                if enc_ext and
-                    not string.match(ext2, '^%d+$')
+                if enc_ext
+                    and settings['bad_extensions'][enc_ext]
+                    and not string.match(ext2, '^%d+$')
                     and enc_ext ~= ext2 then
                   task:insert_result(settings['symbol_double_extension'], 2.0,
                       string.format("%s!=%s", ext2, enc_ext))