From: Vsevolod Stakhov Date: Thu, 12 Sep 2019 10:48:28 +0000 (+0100) Subject: [Minor] Fix checks logic X-Git-Tag: 2.0~218 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=72fb023c1b2869c34b4a839e0c649b29616c5604;p=rspamd.git [Minor] Fix checks logic --- diff --git a/src/plugins/lua/mime_types.lua b/src/plugins/lua/mime_types.lua index 32d9d62f3..b4c71e3f2 100644 --- a/src/plugins/lua/mime_types.lua +++ b/src/plugins/lua/mime_types.lua @@ -244,7 +244,7 @@ local function check_mime_type(task) detected = lua_magic_types[detected_ext] end - if not ext or (detected_ext and ext ~= detected_ext) then + if detected_ext and ((not ext) or ext ~= detected_ext) then -- Try to find extension by real content type check_filename('detected.' .. detected_ext, detected.ct, false, part, nil)