diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2021-07-19 10:23:44 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2021-07-19 10:23:44 +0100 |
commit | dde092ef09cddfae6bd1d70977d5208bb88d2d7f (patch) | |
tree | 7e0d6e2f9420f7f90e952490cdba24cdbf21dd9e /rules | |
parent | 04616a9ef604df1c122fde15587ec52875866515 (diff) | |
download | rspamd-dde092ef09cddfae6bd1d70977d5208bb88d2d7f.tar.gz rspamd-dde092ef09cddfae6bd1d70977d5208bb88d2d7f.zip |
[Minor] Fix checks safety
Diffstat (limited to 'rules')
-rw-r--r-- | rules/html.lua | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/rules/html.lua b/rules/html.lua index 97a6b2372..58fabfd7a 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 |