aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2016-09-27 21:33:36 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2016-09-27 22:06:09 +0100
commit85ea0ba9166ec92bf957fdca231e25568caba34a (patch)
treef1c42c6ba4a65d457121c5f911b85be92d111bb7 /src
parentc4686decb1d2b080ea76491b593da1489506aedf (diff)
downloadrspamd-85ea0ba9166ec92bf957fdca231e25568caba34a.tar.gz
rspamd-85ea0ba9166ec92bf957fdca231e25568caba34a.zip
[Minor] Fix processing of messages with no recipients
Diffstat (limited to 'src')
-rw-r--r--src/plugins/lua/ratelimit.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/lua/ratelimit.lua b/src/plugins/lua/ratelimit.lua
index 1df96c2c5..83cbd5436 100644
--- a/src/plugins/lua/ratelimit.lua
+++ b/src/plugins/lua/ratelimit.lua
@@ -185,7 +185,7 @@ local function dynamic_rate_key(task, rtype)
else
rate_keys = {}
rcpts = task:get_recipients(0)
- if not rcpts and rcpts[1] and rcpts[1]['addr'] then
+ if not rcpts or not rcpts[1] or not rcpts[1]['addr'] then
return nil
end
local key_s = table.concat(key_t, ":")