From: Alexander Moisseev Date: Fri, 8 Mar 2019 12:06:13 +0000 (+0300) Subject: [Minor] mime_types: Skip extensions matching X-Git-Tag: 1.9.0~25^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F2784%2Fhead;p=thirdparty%2Frspamd.git [Minor] mime_types: Skip extensions matching if extension of the file inside archive is not bad --- diff --git a/src/plugins/lua/mime_types.lua b/src/plugins/lua/mime_types.lua index 98acd463f1..589f82515d 100644 --- a/src/plugins/lua/mime_types.lua +++ b/src/plugins/lua/mime_types.lua @@ -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))