diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-02-20 17:25:59 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-02-20 17:25:59 +0000 |
commit | d25084a3451432e1008b5a7a105c42f881ad4d26 (patch) | |
tree | d556a1303836f711ea73d6feae6cdfadd20a89d6 | |
parent | 10e385ec78211ed42eb19fb413a59dfa09e8d5d8 (diff) | |
parent | 029d2f4fa1a99728235d5abd87dca885172f2a72 (diff) | |
download | rspamd-d25084a3451432e1008b5a7a105c42f881ad4d26.tar.gz rspamd-d25084a3451432e1008b5a7a105c42f881ad4d26.zip |
Merge pull request #532 from moisseev/patch-1
Improve html images rules
-rw-r--r-- | rules/html.lua | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/rules/html.lua b/rules/html.lua index 0f26d1421..416ea8c74 100644 --- a/rules/html.lua +++ b/rules/html.lua @@ -38,7 +38,10 @@ local function check_html_image(task, min, max) local parent = tag:get_parent() if parent then if parent:get_type() == 'a' then - return true + -- do not trigger on small and unknown size images + if i['height'] + i['width'] >= 210 then + return true + end end end end @@ -94,7 +97,7 @@ rspamd_config.R_EMPTY_IMAGE = { if tag then local parent = tag:get_parent() if parent then - if parent:get_type() == 'a' then + if parent:get_type() ~= 'a' then return true end end |