From: Vsevolod Stakhov Date: Thu, 27 Dec 2018 14:46:37 +0000 (+0000) Subject: [Minor] Mime_types: Add exclusion for numbers in extensions X-Git-Tag: 1.9.0~372 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=7e1e6b947ddf30741e44bdca52150493e9bbf2fd;p=rspamd.git [Minor] Mime_types: Add exclusion for numbers in extensions --- diff --git a/src/plugins/lua/mime_types.lua b/src/plugins/lua/mime_types.lua index e52933af1..e13d535b4 100644 --- a/src/plugins/lua/mime_types.lua +++ b/src/plugins/lua/mime_types.lua @@ -1001,7 +1001,9 @@ local function check_mime_type(task) if ext2 then local enc_ext = gen_extension(fl[1].name) - if enc_ext and enc_ext ~= ext2 then + if 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)) end