From 15a73c7bed4cd205c7215bf7b0fd8daeffa0edae Mon Sep 17 00:00:00 2001 From: Alexander Moisseev Date: Thu, 27 Apr 2017 20:37:37 +0300 Subject: [PATCH] [Minor] Avoid `nil` table --- rules/misc.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rules/misc.lua b/rules/misc.lua index ccc52d887..ab4a87508 100644 --- a/rules/misc.lua +++ b/rules/misc.lua @@ -578,6 +578,7 @@ rspamd_config.INFO_TO_INFO_LU = { return false end local to = task:get_recipients('smtp') + if not to then return false end local found = false for _,r in ipairs(to) do if util.strequal_caseless(r['user'], 'info') then @@ -609,4 +610,4 @@ rspamd_config.R_BAD_CTE_7BIT = { score = 4.0, description = 'Detects bad content-transfer-encoding for text parts', group = 'header' -} \ No newline at end of file +} -- 2.39.5