diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-11-27 18:36:37 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-11-27 18:36:37 +0000 |
commit | 772f3bb7ac6bba9fa9c885f0880c93c58cb59f5b (patch) | |
tree | 94709ea57e7b61c8aed71e1ab0df0274b5484cae /src/libserver | |
parent | 8c0970499e5aa238df5e12cabba9f10388c56215 (diff) | |
download | rspamd-772f3bb7ac6bba9fa9c885f0880c93c58cb59f5b.tar.gz rspamd-772f3bb7ac6bba9fa9c885f0880c93c58cb59f5b.zip |
[Minor] Exclude raw words from words re class
Diffstat (limited to 'src/libserver')
-rw-r--r-- | src/libserver/re_cache.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/libserver/re_cache.c b/src/libserver/re_cache.c index e43de2c64..1dcd4bbad 100644 --- a/src/libserver/re_cache.c +++ b/src/libserver/re_cache.c @@ -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; + } } } } |