commit 2124901: [CritFix] Neural: Fix sorting application

Vsevolod Stakhov vsevolod at highsecure.ru
Fri Feb 5 10:56:06 UTC 2021


Author: Vsevolod Stakhov
Date: 2021-02-05 10:49:35 +0000
URL: https://github.com/rspamd/rspamd/commit/21249013d490c8591451dd2a4b48d365bc3c7779 (HEAD -> master)

[CritFix] Neural: Fix sorting application
Thanks to: Gerald Auer

---
 lualib/plugins/neural.lua | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lualib/plugins/neural.lua b/lualib/plugins/neural.lua
index 6f82089a4..433a17ac9 100644
--- a/lualib/plugins/neural.lua
+++ b/lualib/plugins/neural.lua
@@ -649,7 +649,8 @@ local function process_rules_settings()
     end
 
     -- Generic stuff
-    table.sort(fun.totable(fun.filter(filter_symbols_predicate, selt.symbols)))
+    selt.symbols = fun.totable(fun.filter(filter_symbols_predicate, selt.symbols))
+    table.sort(selt.symbols)
 
     selt.digest = lua_util.table_digest(selt.symbols)
     selt.prefix = redis_ann_prefix(rule, selt.name)


More information about the Commits mailing list