diff options
author | Vsevolod Stakhov <vsevolod@rspamd.com> | 2022-04-12 21:45:02 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rspamd.com> | 2022-04-12 21:45:49 +0100 |
commit | 5ccd1d0dd02e85220643473bf9757246fae4bf57 (patch) | |
tree | deec12b71b78643a88ac41d31bc93f98ce43f155 /src/plugins | |
parent | 1405bedd7cfae4d8b922049d650cbce5af63f059 (diff) | |
download | rspamd-5ccd1d0dd02e85220643473bf9757246fae4bf57.tar.gz rspamd-5ccd1d0dd02e85220643473bf9757246fae4bf57.zip |
[Minor] Try to fix issue with incorrect indexing in url_reputation
Issue: #4139
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/lua/reputation.lua | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/lua/reputation.lua b/src/plugins/lua/reputation.lua index 192c8ce3f..1dce44faf 100644 --- a/src/plugins/lua/reputation.lua +++ b/src/plugins/lua/reputation.lua @@ -338,7 +338,8 @@ local function url_reputation_filter(task, rule) local result_request_match_tbl = {} -- XXX: ugly O(N^2) loop to match requests and responses - for result_k,_ in pairs(results) do + for _,res_pair in ipairs(results) do + local result_k = res_pair[1] for _, request_k in ipairs(url_keys) do if result_k:find(request_k) then result_request_match_tbl[result_k] = request_k |