commit 8e9cde0: [Rules] Do not trigger HTML_SHORT_LINK_IMG on external images

Vsevolod Stakhov vsevolod at highsecure.ru
Thu Apr 8 16:56:04 UTC 2021


Author: Vsevolod Stakhov
Date: 2021-04-08 17:54:41 +0100
URL: https://github.com/rspamd/rspamd/commit/8e9cde08299838d6cf0d05250240f972983e4fd4 (HEAD -> master)

[Rules] Do not trigger HTML_SHORT_LINK_IMG on external images

---
 rules/html.lua | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/rules/html.lua b/rules/html.lua
index cffb2f94a..2b2b415fd 100644
--- a/rules/html.lua
+++ b/rules/html.lua
@@ -56,7 +56,7 @@ local function check_html_image(task, min, max)
             if tag then
               if has_anchor_parent(tag) then
                 -- do not trigger on small and unknown size images
-                if i['height'] + i['width'] >= 210 or not i['embedded'] then
+                if i['height'] + i['width'] >= 210 and i['embedded'] then
                   return true
                 end
               end


More information about the Commits mailing list