commit 72fb023: [Minor] Fix checks logic
Vsevolod Stakhov
vsevolod at highsecure.ru
Thu Sep 12 10:49:04 UTC 2019
Author: Vsevolod Stakhov
Date: 2019-09-12 11:48:28 +0100
URL: https://github.com/rspamd/rspamd/commit/72fb023c1b2869c34b4a839e0c649b29616c5604 (HEAD -> master)
[Minor] Fix checks logic
---
src/plugins/lua/mime_types.lua | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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)
More information about the Commits
mailing list