commit 7e1e6b9: [Minor] Mime_types: Add exclusion for numbers in extensions
Vsevolod Stakhov
vsevolod at highsecure.ru
Thu Dec 27 18:28:15 UTC 2018
Author: Vsevolod Stakhov
Date: 2018-12-27 14:46:37 +0000
URL: https://github.com/rspamd/rspamd/commit/7e1e6b947ddf30741e44bdca52150493e9bbf2fd
[Minor] Mime_types: Add exclusion for numbers in extensions
---
src/plugins/lua/mime_types.lua | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
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
More information about the Commits
mailing list