Browse Source

[Minor] Filter urls for R_SUSPICIOUS_URL check

Suggested by: @citrin
tags/3.0
Vsevolod Stakhov 3 years ago
parent
commit
0604bcc851
1 changed files with 3 additions and 3 deletions
  1. 3
    3
      rules/misc.lua

+ 3
- 3
rules/misc.lua View File

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

Loading…
Cancel
Save