aboutsummaryrefslogtreecommitdiffstats
path: root/src/libserver/re_cache.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2018-11-27 18:36:37 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2018-11-27 18:36:37 +0000
commit772f3bb7ac6bba9fa9c885f0880c93c58cb59f5b (patch)
tree94709ea57e7b61c8aed71e1ab0df0274b5484cae /src/libserver/re_cache.c
parent8c0970499e5aa238df5e12cabba9f10388c56215 (diff)
downloadrspamd-772f3bb7ac6bba9fa9c885f0880c93c58cb59f5b.tar.gz
rspamd-772f3bb7ac6bba9fa9c885f0880c93c58cb59f5b.zip
[Minor] Exclude raw words from words re class
Diffstat (limited to 'src/libserver/re_cache.c')
-rw-r--r--src/libserver/re_cache.c7
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;
+ }
}
}
}