commit 5d1c4e0: [Minor] Fix fuzzy_unlearn_handler when a flag is specified

Vsevolod Stakhov vsevolod at rspamd.com
Wed Jul 5 20:35:03 UTC 2023


Author: Vsevolod Stakhov
Date: 2023-07-05 21:33:36 +0100
URL: https://github.com/rspamd/rspamd/commit/5d1c4e0143c4b3ee764448a27c28fd6e6a5b0035 (HEAD -> master)

[Minor] Fix fuzzy_unlearn_handler when a flag is specified
Issue: #4531

---
 src/plugins/fuzzy_check.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/plugins/fuzzy_check.c b/src/plugins/fuzzy_check.c
index fd8e56cce..8dff7a6c9 100644
--- a/src/plugins/fuzzy_check.c
+++ b/src/plugins/fuzzy_check.c
@@ -3867,7 +3867,7 @@ fuzzy_lua_unlearn_handler (lua_State *L)
 	struct fuzzy_ctx *fuzzy_module_ctx = fuzzy_get_context (task->cfg);
 
 	if (lua_type (L, 2) == LUA_TNUMBER) {
-		flag = lua_tonumber (L, 1);
+		flag = lua_tointeger (L, 2);
 	}
 	else if (lua_type (L, 2) == LUA_TSTRING) {
 		struct fuzzy_rule *rule;


More information about the Commits mailing list