]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Ratelimit: properly handle bounces with empty `from` 1029/head
authorAlexander Moisseev <moiseev@mezonplus.ru>
Fri, 14 Oct 2016 11:48:29 +0000 (14:48 +0300)
committerGitHub <noreply@github.com>
Fri, 14 Oct 2016 11:48:29 +0000 (14:48 +0300)
src/plugins/lua/ratelimit.lua

index 578c5cc233e7860b8b81fed1c968da5c39f84638..7a4d606de098adaca2f5199d4cf2bfe6824c7e4b 100644 (file)
@@ -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