summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2017-05-26 16:04:22 +0100
committerGitHub <noreply@github.com>2017-05-26 16:04:22 +0100
commitd7fc829253b35f2aabc2b229ba94b08bb27288a3 (patch)
tree16ad902f80374a3af61e7f38324a9421f0534807 /src
parent32c08dba621410ac0694c89455003fdba05d2c35 (diff)
parente7c48b947fdba28117516a19a5af622f6f484690 (diff)
downloadrspamd-d7fc829253b35f2aabc2b229ba94b08bb27288a3.tar.gz
rspamd-d7fc829253b35f2aabc2b229ba94b08bb27288a3.zip
Merge pull request #1652 from fatalbanana/phishing
Phishing: fix strict_domains
Diffstat (limited to 'src')
-rw-r--r--src/plugins/lua/phishing.lua8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/plugins/lua/phishing.lua b/src/plugins/lua/phishing.lua
index 880b85b8f..cd2288067 100644
--- a/src/plugins/lua/phishing.lua
+++ b/src/plugins/lua/phishing.lua
@@ -182,12 +182,14 @@ local function phishing_cb(task)
rspamd_logger.debugm(N, task, "distance: %1 -> %2: %3", tld, ptld, dist)
end
- local function found_in_map(map)
+ local function found_in_map(map, furl, sweight)
+ if not furl then furl = url end
+ if not sweight then sweight = weight end
if #map > 0 then
for _,rule in ipairs(map) do
- for _,dn in ipairs({url:get_tld(), url:get_host()}) do
+ for _,dn in ipairs({furl:get_tld(), furl:get_host()}) do
if rule['map']:get_key(dn) then
- task:insert_result(rule['symbol'], weight, ptld .. '->' .. dn)
+ task:insert_result(rule['symbol'], sweight, ptld .. '->' .. dn)
return true
end
end