From da71c78ee2d009575811a338bf29ca80f1ee4852 Mon Sep 17 00:00:00 2001 From: Alexander Moisseev Date: Fri, 14 Oct 2016 14:48:29 +0300 Subject: [PATCH] [Minor] Ratelimit: properly handle bounces with empty `from` --- src/plugins/lua/ratelimit.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.39.5