Browse Source

[Fix] Phishing: strict_domains

tags/1.6.0
Andrew Lewis 7 years ago
parent
commit
ff0d6e33c1
1 changed files with 5 additions and 3 deletions
  1. 5
    3
      src/plugins/lua/phishing.lua

+ 5
- 3
src/plugins/lua/phishing.lua View File

@@ -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

Loading…
Cancel
Save