diff options
author | Alexander Moisseev <moiseev@mezonplus.ru> | 2016-10-14 14:48:29 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-10-14 14:48:29 +0300 |
commit | da71c78ee2d009575811a338bf29ca80f1ee4852 (patch) | |
tree | 1b287e3582ddb3dcba640ccfc5f26e9f7d35367b | |
parent | c7cf4d68dbf5adb173f5a7391833cc9df8e2b4dd (diff) | |
download | rspamd-da71c78ee2d009575811a338bf29ca80f1ee4852.tar.gz rspamd-da71c78ee2d009575811a338bf29ca80f1ee4852.zip |
[Minor] Ratelimit: properly handle bounces with empty `from`
-rw-r--r-- | src/plugins/lua/ratelimit.lua | 2 |
1 files changed, 1 insertions, 1 deletions
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 |