From d2f95b4a010032f96a947b8ac63e1da51af14ad5 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Mon, 26 Nov 2018 14:35:06 +0000 Subject: [Minor] Ignore skipped words --- src/plugins/fuzzy_check.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/plugins/fuzzy_check.c b/src/plugins/fuzzy_check.c index dd59fc542..bfb6b4d72 100644 --- a/src/plugins/fuzzy_check.c +++ b/src/plugins/fuzzy_check.c @@ -1459,8 +1459,12 @@ fuzzy_cmd_from_text_part (struct rspamd_task *task, for (i = 0; i < words->len; i ++) { word = &g_array_index (words, rspamd_stat_token_t, i); - rspamd_cryptobox_hash_update (&st, word->stemmed.begin, - word->stemmed.len); + + if (!((word->flags & RSPAMD_STAT_TOKEN_FLAG_SKIPPED) + || word->stemmed.len == 0)) { + rspamd_cryptobox_hash_update (&st, word->stemmed.begin, + word->stemmed.len); + } } rspamd_cryptobox_hash_final (&st, shcmd->basic.digest); -- cgit v1.2.3