aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/lua/forged_recipients.lua
diff options
context:
space:
mode:
authorAndrew Lewis <nerf@judo.za.org>2016-09-01 10:22:50 +0200
committerAndrew Lewis <nerf@judo.za.org>2016-09-01 10:22:50 +0200
commit47fb93233a3f9ee2ca1c49d802113a392b660df4 (patch)
treeb95dc29ef9ddadf6ad1173ef25e9e4533feb3719 /src/plugins/lua/forged_recipients.lua
parenteb7db9325e5460cd9980fcf24805aaa0c0659668 (diff)
downloadrspamd-47fb93233a3f9ee2ca1c49d802113a392b660df4.tar.gz
rspamd-47fb93233a3f9ee2ca1c49d802113a392b660df4.zip
[Fix] Banish table.maxn from Lua parts
Diffstat (limited to 'src/plugins/lua/forged_recipients.lua')
-rw-r--r--src/plugins/lua/forged_recipients.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/lua/forged_recipients.lua b/src/plugins/lua/forged_recipients.lua
index a9347a685..957491a56 100644
--- a/src/plugins/lua/forged_recipients.lua
+++ b/src/plugins/lua/forged_recipients.lua
@@ -30,9 +30,9 @@ local function check_forged_headers(task)
local mime_rcpt = task:get_recipients(2)
local count = 0
if mime_rcpt then
- count = table.maxn(mime_rcpt)
+ count = #mime_rcpt
end
- if count > 0 and count < table.maxn(smtp_rcpt) then
+ if count > 0 and count < #smtp_rcpt then
task:insert_result(symbol_rcpt, 1)
elseif count > 0 then
-- Find pair for each smtp recipient recipient in To or Cc headers