commit 4283a77: [Minor] Lua_magic: Some minor fixes
Vsevolod Stakhov
vsevolod at highsecure.ru
Mon Sep 9 14:14:06 UTC 2019
Author: Vsevolod Stakhov
Date: 2019-09-09 15:08:05 +0100
URL: https://github.com/rspamd/rspamd/commit/4283a774fdfd5582ab516387a7a77969c40bb56f (HEAD -> master)
[Minor] Lua_magic: Some minor fixes
---
lualib/lua_magic/init.lua | 4 ++--
lualib/lua_magic/patterns.lua | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/lualib/lua_magic/init.lua b/lualib/lua_magic/init.lua
index 27f968149..0784b4a77 100644
--- a/lualib/lua_magic/init.lua
+++ b/lualib/lua_magic/init.lua
@@ -326,9 +326,9 @@ exports.detect_mime_part = function(part, log_obj)
return ext,types[ext]
end
- ext,weight = exports.detect(part:get_content(), log_obj)
+ ext = exports.detect(part:get_content(), log_obj)
- if ext and weight and weight > 20 then
+ if ext then
return ext,types[ext]
end
diff --git a/lualib/lua_magic/patterns.lua b/lualib/lua_magic/patterns.lua
index 630f287ce..1ac18c8ea 100644
--- a/lualib/lua_magic/patterns.lua
+++ b/lualib/lua_magic/patterns.lua
@@ -209,8 +209,8 @@ local patterns = {
zst = {
matches = {
{
- string = [[\x{FD}\x{2F}\x{B5}[\x{22}-\x{40}].]],
- position = 5, -- includes last .
+ string = [[[\x{22}-\x{40}]\x{B5}\x{2F}\x{FD}]],
+ position = 4,
weight = 60,
},
}
More information about the Commits
mailing list