aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2019-09-09 15:08:05 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2019-09-09 15:08:05 +0100
commit4283a774fdfd5582ab516387a7a77969c40bb56f (patch)
treeb8a90237457b15f82c720e96d8f2eea2d577a86d
parentda99d2d9118c0e67e40d8e568fcda998ad329d45 (diff)
downloadrspamd-4283a774fdfd5582ab516387a7a77969c40bb56f.tar.gz
rspamd-4283a774fdfd5582ab516387a7a77969c40bb56f.zip
[Minor] Lua_magic: Some minor fixes
-rw-r--r--lualib/lua_magic/init.lua4
-rw-r--r--lualib/lua_magic/patterns.lua4
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,
},
}