From: Vsevolod Stakhov Date: Mon, 19 Jul 2021 09:23:44 +0000 (+0100) Subject: [Minor] Fix checks safety X-Git-Tag: 3.0~136 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=dde092ef09cddfae6bd1d70977d5208bb88d2d7f;p=thirdparty%2Frspamd.git [Minor] Fix checks safety --- diff --git a/rules/html.lua b/rules/html.lua index 97a6b23727..58fabfd7ae 100644 --- a/rules/html.lua +++ b/rules/html.lua @@ -214,10 +214,12 @@ local vis_check_id = rspamd_config:register_symbol{ local tr = transp_len / (normal_len + transp_len) if tr > transp_rate then transp_rate = tr + if not bl.color then bl.color = {0, 0, 0} end + if not bl.bgcolor then bl.bgcolor = {0, 0, 0} end arg = string.format('%s color #%x%x%x bgcolor #%x%x%x', tag:get_type(), - bl.color[1] or 0, bl.color[2] or 0, bl.color[3] or 0, - bl.bgcolor[1] or 0, bl.bgcolor[2] or 0, bl.bgcolor[3] or 0) + bl.color[1], bl.color[2], bl.color[3], + bl.bgcolor[1], bl.bgcolor[2], bl.bgcolor[3]) end end end