From: Steve Freegard Date: Thu, 13 Apr 2017 08:00:42 +0000 (+0100) Subject: Fix HTTP_TO_HTTPS where message is_html but get_html returns nil X-Git-Tag: 1.5.6~23^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=77f3cfc7101a288a62e8f1e8127bf19d38522bec;p=rspamd.git Fix HTTP_TO_HTTPS where message is_html but get_html returns nil --- diff --git a/rules/html.lua b/rules/html.lua index 2c28e85d8..340716b85 100644 --- a/rules/html.lua +++ b/rules/html.lua @@ -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