From: Carsten Rosenberg Date: Wed, 10 Nov 2021 22:32:32 +0000 (+0100) Subject: [Fix] ratelimit - symbol per bucket X-Git-Tag: 3.2~271^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F3974%2Fhead;p=thirdparty%2Frspamd.git [Fix] ratelimit - symbol per bucket --- diff --git a/src/plugins/lua/ratelimit.lua b/src/plugins/lua/ratelimit.lua index e310263668..b265ea1ca5 100644 --- a/src/plugins/lua/ratelimit.lua +++ b/src/plugins/lua/ratelimit.lua @@ -797,8 +797,8 @@ if opts then end, fun.map(function(n,d) return string.format('%s [%s]', n, table.concat(fun.totable(fun.map(function(v) - return string.format('%s msgs burst, %s msgs/sec rate', - v.burst, v.rate) + return string.format('symbol: %s, %s msgs burst, %s msgs/sec rate', + v.symbol, v.burst, v.rate) end, d.buckets)), '; ') ) end, settings.limits)) @@ -877,9 +877,9 @@ if opts then -- Register per bucket symbols -- Display what's enabled - fun.each(function(set) - if set.buckets then - for _,b in ipairs(set.buckets) do + fun.each(function(set, lim) + if type(lim.buckets) == 'table' then + for _,b in ipairs(lim.buckets) do if b.symbol then rspamd_config:register_symbol{ type = 'virtual',