commit ecc1876: [Minor] Fix force actions limit compare
Vsevolod Stakhov
vsevolod at highsecure.ru
Fri Oct 23 15:35:08 UTC 2020
Author: Vsevolod Stakhov
Date: 2020-10-23 15:13:52 +0100
URL: https://github.com/rspamd/rspamd/commit/ecc18762a6299d61907b47286413513db7ce3f9e
[Minor] Fix force actions limit compare
---
src/plugins/lua/force_actions.lua | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/plugins/lua/force_actions.lua b/src/plugins/lua/force_actions.lua
index 6e9ef9200..99dcb15cc 100644
--- a/src/plugins/lua/force_actions.lua
+++ b/src/plugins/lua/force_actions.lua
@@ -102,7 +102,7 @@ local function gen_cb(params)
local ret = e:process(task)
lua_util.debugm(N, task, "expression %s returned %s", params.expr, ret)
- if (not params.limit and ret > 0) or ret > params.limit then
+ if (not params.limit and ret > 0) or (ret > (params.limit or 0)) then
if params.subject then
task:set_metric_subject(params.subject)
end
More information about the Commits
mailing list