aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorAlexander Moisseev <moiseev@mezonplus.ru>2017-11-06 18:46:24 +0300
committerAlexander Moisseev <moiseev@mezonplus.ru>2017-11-06 18:46:24 +0300
commit8dd72f1c09dca0a1a5763b35cd958c3b6f057209 (patch)
tree18e170898b4e8eef99fc3bf892be5575deb6edde /src/plugins
parentec03ec15402c65ebe69576ef7d6aa3782ab83a2f (diff)
downloadrspamd-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.lua1
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