diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2021-05-11 15:26:34 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2021-05-11 15:26:34 +0100 |
commit | 0604bcc851c3337fc32f535449dc3640a5486e07 (patch) | |
tree | 98d4fb3499ccfe0814c1e16d4986dd1e3275b6b6 | |
parent | deda62a64f558f38a89f2d93b9797a5f91693534 (diff) | |
download | rspamd-0604bcc851c3337fc32f535449dc3640a5486e07.tar.gz rspamd-0604bcc851c3337fc32f535449dc3640a5486e07.zip |
[Minor] Filter urls for R_SUSPICIOUS_URL check
Suggested by: @citrin
-rw-r--r-- | rules/misc.lua | 6 |
1 files 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()) |