From: Alexander Moisseev Date: Mon, 6 Nov 2017 15:46:24 +0000 (+0300) Subject: [Fix] Skip checks if both extensions are not bad X-Git-Tag: 1.7.0~463^2~1 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=8dd72f1c09dca0a1a5763b35cd958c3b6f057209;p=rspamd.git [Fix] Skip checks if both extensions are not bad --- 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