commit 6bfb118: [Minor] mime_types: Skip extensions matching
Alexander Moisseev
moiseev at mezonplus.ru
Fri Mar 8 14:21:03 UTC 2019
Author: Alexander Moisseev
Date: 2019-03-08 15:06:13 +0300
URL: https://github.com/rspamd/rspamd/commit/6bfb1182eb065aa72afbf364e80277896943452f (refs/pull/2784/head)
[Minor] mime_types: Skip extensions matching
if extension of the file inside archive is not bad
---
src/plugins/lua/mime_types.lua | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/plugins/lua/mime_types.lua b/src/plugins/lua/mime_types.lua
index 98acd463f..589f82515 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))
More information about the Commits
mailing list