From: Andrew Lewis Date: Thu, 3 Mar 2016 08:43:59 +0000 (+0200) Subject: [Fix] Avoid problematic operation on possibly nil value in once_received X-Git-Tag: 1.2.0~132^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F543%2Fhead;p=thirdparty%2Frspamd.git [Fix] Avoid problematic operation on possibly nil value in once_received --- diff --git a/src/plugins/lua/once_received.lua b/src/plugins/lua/once_received.lua index 4bac5adff0..d192c0b794 100644 --- a/src/plugins/lua/once_received.lua +++ b/src/plugins/lua/once_received.lua @@ -114,6 +114,7 @@ local function check_quantity_received (task) -- Unresolved host task:insert_result(symbol, 1) + if not hn then return end for _,h in ipairs(bad_hosts) do if string.find(hn, h) then task:insert_result(symbol_strict, 1, h)