From 0604bcc851c3337fc32f535449dc3640a5486e07 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Tue, 11 May 2021 15:26:34 +0100 Subject: [Minor] Filter urls for R_SUSPICIOUS_URL check Suggested by: @citrin --- rules/misc.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/rules/misc.lua b/rules/misc.lua index b20f62bab..a7e77516d 100644 --- a/rules/misc.lua +++ b/rules/misc.lua @@ -126,12 +126,12 @@ rspamd_config:register_symbol({ local obscured_id = rspamd_config:register_symbol{ callback = function(task) - local urls = task:get_urls() + local susp_urls = task:get_urls_filtered({ 'obscured', 'zw_spaces'}) local obs_flag = url_flags_tab.obscured local zw_flag = url_flags_tab.zw_spaces - if urls then - for _,u in ipairs(urls) do + if susp_urls then + for _,u in ipairs(susp_urls) do local fl = u:get_flags_num() if bit.band(fl, obs_flag) then task:insert_result('R_SUSPICIOUS_URL', 1.0, u:get_host()) -- cgit v1.2.3