diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-12-27 14:46:37 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-12-27 14:46:37 +0000 |
commit | 7e1e6b947ddf30741e44bdca52150493e9bbf2fd (patch) | |
tree | c2b79a345df8f0b2c248ce9042a4644cded78c93 /src/plugins | |
parent | 254b078a7d3a29f637971378ebb63c813876b38e (diff) | |
download | rspamd-7e1e6b947ddf30741e44bdca52150493e9bbf2fd.tar.gz rspamd-7e1e6b947ddf30741e44bdca52150493e9bbf2fd.zip |
[Minor] Mime_types: Add exclusion for numbers in extensions
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/lua/mime_types.lua | 4 |
1 files changed, 3 insertions, 1 deletions
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 |