From 5fc30a05fbd7eb93e2318e642fee942e874f60fc Mon Sep 17 00:00:00 2001 From: Alexander Moisseev Date: Sat, 3 Dec 2016 21:20:43 +0300 Subject: [PATCH] [Minor] Avoid nil index --- rules/misc.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rules/misc.lua b/rules/misc.lua index 20e4d3ddf..5eeda6af3 100644 --- a/rules/misc.lua +++ b/rules/misc.lua @@ -490,7 +490,7 @@ local check_from_id = rspamd_config:register_callback_symbol('CHECK_FROM', 1.0, then task:insert_result('FROM_EQ_ENVFROM', 1.0) elseif (envfrom and envfrom[1] and envfrom[1].addr) then - task:insert_result('FROM_NEQ_ENVFROM', 1.0, from[1].addr, envfrom[1].addr) + task:insert_result('FROM_NEQ_ENVFROM', 1.0, from and from[1].addr or '', envfrom[1].addr) end local to = task:get_recipients(2) -- 2.39.5