diff options
author | Alexander Moisseev <moiseev@mezonplus.ru> | 2017-11-06 18:46:24 +0300 |
---|---|---|
committer | Alexander Moisseev <moiseev@mezonplus.ru> | 2017-11-06 18:46:24 +0300 |
commit | 8dd72f1c09dca0a1a5763b35cd958c3b6f057209 (patch) | |
tree | 18e170898b4e8eef99fc3bf892be5575deb6edde /src/plugins | |
parent | ec03ec15402c65ebe69576ef7d6aa3782ab83a2f (diff) | |
download | rspamd-8dd72f1c09dca0a1a5763b35cd958c3b6f057209.tar.gz rspamd-8dd72f1c09dca0a1a5763b35cd958c3b6f057209.zip |
[Fix] Skip checks if both extensions are not bad
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/lua/mime_types.lua | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/plugins/lua/mime_types.lua b/src/plugins/lua/mime_types.lua index 1705ca366..507ffe65b 100644 --- a/src/plugins/lua/mime_types.lua +++ b/src/plugins/lua/mime_types.lua @@ -106,6 +106,7 @@ local function check_mime_type(task) -- ext2 is the one before last extension LOWERCASED local function check_extension(badness_mult, badness_mult2) + if not badness_mult and not badness_mult2 then return end if #parts > 2 then -- We need to ensure that it is an extension, so we check for its length -- Check if next-to-last extension is not a number or date |