]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Fix processing of messages with no recipients
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 27 Sep 2016 20:33:36 +0000 (21:33 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 27 Sep 2016 21:06:09 +0000 (22:06 +0100)
src/plugins/lua/ratelimit.lua

index 1df96c2c59abc3aeb449675c70e5813c6fb79f0a..83cbd5436a27198587d4d389614c18512f20cd57 100644 (file)
@@ -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, ":")