From f4d4c0fc55738682cc8b1819e19c496195e34e06 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Tue, 14 Feb 2017 13:37:01 +0000 Subject: [PATCH] [Fix] Ignore lua metatokens in bayes for now --- src/libstat/classifiers/bayes.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/libstat/classifiers/bayes.c b/src/libstat/classifiers/bayes.c index 98b3fd6ca..fb1ffdde2 100644 --- a/src/libstat/classifiers/bayes.c +++ b/src/libstat/classifiers/bayes.c @@ -112,6 +112,11 @@ bayes_classify_token (struct rspamd_classifier *ctx, task = cl->task; + if (tok->flags & RSPAMD_STAT_TOKEN_FLAG_LUA_META) { + /* Ignore lua metatokens for now */ + return; + } + for (i = 0; i < ctx->statfiles_ids->len; i++) { id = g_array_index (ctx->statfiles_ids, gint, i); st = g_ptr_array_index (ctx->ctx->statfiles, id); -- 2.39.5