commit 03ff121: [Minor] Fix find to search for plain substrings only

Vsevolod Stakhov vsevolod at highsecure.ru
Mon Mar 14 20:14:04 UTC 2022


Author: Vsevolod Stakhov
Date: 2022-03-14 20:06:59 +0000
URL: https://github.com/rspamd/rspamd/commit/03ff121256bb6ce39827b34300aafbbf8275d619 (HEAD -> master)

[Minor] Fix find to search for plain substrings only

---
 src/plugins/lua/reputation.lua | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/plugins/lua/reputation.lua b/src/plugins/lua/reputation.lua
index ff292525a..de873abff 100644
--- a/src/plugins/lua/reputation.lua
+++ b/src/plugins/lua/reputation.lua
@@ -177,7 +177,7 @@ local function dkim_reputation_filter(task, rule)
         -- all requests to find any request with the matching tld
         local sel_tld
         for _,tld in ipairs(dkim_tlds) do
-          if k:find(tld) then
+          if k:find(tld, 1, true) then
             sel_tld = tld
             break
           end


More information about the Commits mailing list