aboutsummaryrefslogtreecommitdiffstats
path: root/lualib/lua_magic/heuristics.lua
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2019-09-24 09:26:04 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2019-09-24 09:26:04 +0100
commitb32d6cde09df0e45c178623888d4249102cd054f (patch)
treeda20f5dbcbb646e417e88017cc61fbfc10ee5863 /lualib/lua_magic/heuristics.lua
parent6321d90514ddfb14aface7b2ddb954a4d4fb0414 (diff)
downloadrspamd-b32d6cde09df0e45c178623888d4249102cd054f.tar.gz
rspamd-b32d6cde09df0e45c178623888d4249102cd054f.zip
[Minor] Lua_magic: Improve hyperscan usage
Diffstat (limited to 'lualib/lua_magic/heuristics.lua')
-rw-r--r--lualib/lua_magic/heuristics.lua5
1 files changed, 4 insertions, 1 deletions
diff --git a/lualib/lua_magic/heuristics.lua b/lualib/lua_magic/heuristics.lua
index 04c89ba69..8fb83bb0d 100644
--- a/lualib/lua_magic/heuristics.lua
+++ b/lualib/lua_magic/heuristics.lua
@@ -95,7 +95,10 @@ local function compile_tries()
end
end
- return rspamd_trie.create(strs, rspamd_trie.flags.re)
+ local compile_flags = bit.bor(rspamd_trie.flags.re, rspamd_trie.flags.dot_all)
+ compile_flags = bit.bor(compile_flags, rspamd_trie.flags.single_match)
+ compile_flags = bit.bor(compile_flags, rspamd_trie.flags.no_start)
+ return rspamd_trie.create(strs, compile_flags)
end
if not msoffice_trie then