diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-12-16 11:19:54 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-12-16 11:19:54 +0000 |
commit | 51a013a8981deb100e8c284776071cc43c8c8a2b (patch) | |
tree | e654942d99ce6fa75de99131ef1afda0ecb79a43 /src/plugins/lua/trie.lua | |
parent | 2e3fa88b5cc0636d2b4623aba5bfed7ba6a1792d (diff) | |
download | rspamd-51a013a8981deb100e8c284776071cc43c8c8a2b.tar.gz rspamd-51a013a8981deb100e8c284776071cc43c8c8a2b.zip |
[Fix] Fix matching of the same patterns from different tries
MFH: true
Diffstat (limited to 'src/plugins/lua/trie.lua')
-rw-r--r-- | src/plugins/lua/trie.lua | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/plugins/lua/trie.lua b/src/plugins/lua/trie.lua index cad28cde5..876f2b0e2 100644 --- a/src/plugins/lua/trie.lua +++ b/src/plugins/lua/trie.lua @@ -54,13 +54,14 @@ local function tries_callback(task) return function (idx, pos) local param = params[idx] local pattern = patterns[idx] + local pattern_idx = pattern .. tostring(idx) .. type - if param['multi'] or not matched[pattern] then + if param['multi'] or not matched[pattern_idx] then rspamd_logger.debugm(N, task, "<%1> matched pattern %2 at pos %3", task:get_message_id(), pattern, pos) task:insert_result(param['symbol'], 1.0, type) if not param['multi'] then - matched[pattern] = true + matched[pattern_idx] = true end end end |