]> source.dussan.org Git - rspamd.git/commitdiff
Fix HTTP_TO_HTTPS where message is_html but get_html returns nil 1588/head
authorSteve Freegard <steve@stevefreegard.com>
Thu, 13 Apr 2017 08:00:42 +0000 (09:00 +0100)
committerSteve Freegard <steve@stevefreegard.com>
Thu, 13 Apr 2017 08:00:42 +0000 (09:00 +0100)
rules/html.lua

index 2c28e85d8bd023c7e3c379604134ceed42a59cd3..340716b85c3345c095e5490cfde725efc7e7073b 100644 (file)
@@ -272,6 +272,7 @@ rspamd_config.HTTP_TO_HTTPS = {
     for _,p in ipairs(tp) do
       if p:is_html() then
         local hc = p:get_html()
+        if (not hc) then return false end
         local found = false
         hc:foreach_tag('a', function (tag, length)
           -- Skip this loop if we already have a match