Explorar el Código

[Fix] Add more sanity checks for rua in dmarc_report

Issue: #4148
tags/3.3
Vsevolod Stakhov hace 2 años
padre
commit
bf943d3694
No account linked to committer's email address
Se han modificado 1 ficheros con 3 adiciones y 1 borrados
  1. 3
    1
      lualib/rspamadm/dmarc_report.lua

+ 3
- 1
lualib/rspamadm/dmarc_report.lua Ver fichero

@@ -293,7 +293,7 @@ local function process_rua(dmarc_domain, rua)
local addrs = {}
for _,a in ipairs(parts) do
local u = rspamd_url.create(pool, a:gsub('!%d+[kmg]?$', ''))
if u then
if u and (u:get_protocol() or '') == 'mailto' and u:get_user() then
-- Check each address for sanity
if dmarc_domain == u:get_tld() or dmarc_domain == u:get_host() then
-- Same domain - always include
@@ -328,6 +328,8 @@ local function process_rua(dmarc_domain, rua)
end
end
end
else
logger.errx('invalid rua url: "%s""', tostring(u or 'null'))
end
end


Cargando…
Cancelar
Guardar