]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Ignore skipped words
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 26 Nov 2018 14:35:06 +0000 (14:35 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 26 Nov 2018 14:35:06 +0000 (14:35 +0000)
src/plugins/fuzzy_check.c

index dd59fc542ce9243aabf6135a775d15d9156adc04..bfb6b4d72f8b1423c7a5855639aaa31829454e22 100644 (file)
@@ -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);