From: Lionel Date: Tue, 6 Oct 2020 17:12:31 +0000 (+0200) Subject: fix potential error if fdtld and mdtld == nil X-Git-Tag: 2.7~255^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ecbf70a7ee51f643f10125dbede445a44a703c0c;p=thirdparty%2Frspamd.git fix potential error if fdtld and mdtld == nil --- diff --git a/rules/mid.lua b/rules/mid.lua index 68a15136c0..a7ffb27e1a 100644 --- a/rules/mid.lua +++ b/rules/mid.lua @@ -53,7 +53,7 @@ local function mid_check_func(task) task:insert_result('MID_CONTAINS_FROM', 1.0) elseif (md and fd == md:lower()) then task:insert_result('MID_RHS_MATCH_FROM', 1.0) - elseif (md and mdtld:lower() == fdtld) then + elseif (mdtld ~= nil and fdtld ~= nil and mdtld:lower() == fdtld) then task:insert_result('MID_RHS_MATCH_FROMTLD', 1.0) end end