aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2018-11-26 14:35:06 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2018-11-26 14:35:06 +0000
commitd2f95b4a010032f96a947b8ac63e1da51af14ad5 (patch)
tree61897eca6fa2416fac8dd01f06ee60d4806b080d /src
parentd6f3922d8d5de37238c6467eea133c10ff6c9316 (diff)
downloadrspamd-d2f95b4a010032f96a947b8ac63e1da51af14ad5.tar.gz
rspamd-d2f95b4a010032f96a947b8ac63e1da51af14ad5.zip
[Minor] Ignore skipped words
Diffstat (limited to 'src')
-rw-r--r--src/plugins/fuzzy_check.c8
1 files changed, 6 insertions, 2 deletions
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);