]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
[Minor] Exclude raw words from words re class
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 27 Nov 2018 18:36:37 +0000 (18:36 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 27 Nov 2018 18:36:37 +0000 (18:36 +0000)
src/libserver/re_cache.c

index e43de2c640993e164f4f0bb5b88635825f58663d..1dcd4bbad9f43169c1db2e15d7325c0f544791d5 100644 (file)
@@ -1225,8 +1225,11 @@ rspamd_re_cache_exec_re (struct rspamd_task *task,
                                                for (j = 0; j < part->utf_words->len; j ++) {
                                                        tok = &g_array_index (part->utf_words,
                                                                        rspamd_stat_token_t, j);
-                                                       scvec[cnt] = tok->normalized.begin;
-                                                       lenvec[cnt++] = tok->normalized.len;
+
+                                                       if (tok->flags & RSPAMD_STAT_TOKEN_FLAG_UTF) {
+                                                               scvec[cnt] = tok->normalized.begin;
+                                                               lenvec[cnt++] = tok->normalized.len;
+                                                       }
                                                }
                                        }
                                }