]> source.dussan.org Git - rspamd.git/commitdiff
Don't trigger R_EMPTY_IMAGE on image links 532/head
authorAlexander Moisseev <moiseev@mezonplus.ru>
Sat, 20 Feb 2016 07:45:22 +0000 (10:45 +0300)
committerAlexander Moisseev <moiseev@mezonplus.ru>
Sat, 20 Feb 2016 07:45:22 +0000 (10:45 +0300)
as they covered with `HTML_SHORT_LINK_IMG_1` rule.
It should be safe for legitimate emails with images attached since `R_EMPTY_IMAGE` and `HTML_SHORT_LINK_IMG_1` won't be triggered at the same time any more.

rules/html.lua

index 47ff528e83c2e2314170e80a25b1d5cbb2567724..416ea8c74b88ffd161b4fe80045015bbb3e13374 100644 (file)
@@ -97,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