aboutsummaryrefslogtreecommitdiffstats
path: root/rules/html.lua
diff options
context:
space:
mode:
authorSteve Freegard <steve@stevefreegard.com>2017-04-13 09:00:42 +0100
committerSteve Freegard <steve@stevefreegard.com>2017-04-13 09:00:42 +0100
commit77f3cfc7101a288a62e8f1e8127bf19d38522bec (patch)
tree4b0806359a94bbe4a539357dda1c9bd2e2d97e6d /rules/html.lua
parent9aa169e092def662ec521adb6a07c04e46375fa0 (diff)
downloadrspamd-77f3cfc7101a288a62e8f1e8127bf19d38522bec.tar.gz
rspamd-77f3cfc7101a288a62e8f1e8127bf19d38522bec.zip
Fix HTTP_TO_HTTPS where message is_html but get_html returns nil
Diffstat (limited to 'rules/html.lua')
-rw-r--r--rules/html.lua1
1 files changed, 1 insertions, 0 deletions
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