From: Vsevolod Stakhov Date: Mon, 26 Nov 2018 14:35:06 +0000 (+0000) Subject: [Minor] Ignore skipped words X-Git-Tag: 1.8.3~47 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d2f95b4a010032f96a947b8ac63e1da51af14ad5;p=thirdparty%2Frspamd.git [Minor] Ignore skipped words --- diff --git a/src/plugins/fuzzy_check.c b/src/plugins/fuzzy_check.c index dd59fc542c..bfb6b4d72f 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);