From: Alexander Moisseev Date: Fri, 14 Oct 2016 11:48:29 +0000 (+0300) Subject: [Minor] Ratelimit: properly handle bounces with empty `from` X-Git-Tag: 1.4.0~263^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=da71c78ee2d009575811a338bf29ca80f1ee4852;p=rspamd.git [Minor] Ratelimit: properly handle bounces with empty `from` --- diff --git a/src/plugins/lua/ratelimit.lua b/src/plugins/lua/ratelimit.lua index 578c5cc23..7a4d606de 100644 --- a/src/plugins/lua/ratelimit.lua +++ b/src/plugins/lua/ratelimit.lua @@ -121,7 +121,7 @@ local keywords = { ['bounce'] = { ['get_value'] = function(task) local from = task:get_from(0) - if not from and from[1] and from[1]['user'] then + if not from or not from[1] or not from[1]['user'] then return '_' end if check_bounce(from[1]['user']) then return '_' else return nil end