diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2021-06-16 15:22:48 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2021-06-16 15:22:48 +0100 |
commit | acc4b6480944600f47dcc0458214afe5b569ab33 (patch) | |
tree | a1b5d18ec7356df6646e5ecf740d0e3fcb717482 /src/libstat | |
parent | daa4ca9561c5a06a99b1995793f3511271bf4cc2 (diff) | |
download | rspamd-acc4b6480944600f47dcc0458214afe5b569ab33.tar.gz rspamd-acc4b6480944600f47dcc0458214afe5b569ab33.zip |
[Project] Add process exceptions for invisible text
Diffstat (limited to 'src/libstat')
-rw-r--r-- | src/libstat/tokenizers/tokenizers.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/libstat/tokenizers/tokenizers.c b/src/libstat/tokenizers/tokenizers.c index f3b05240c..8d6d93add 100644 --- a/src/libstat/tokenizers/tokenizers.c +++ b/src/libstat/tokenizers/tokenizers.c @@ -275,6 +275,14 @@ rspamd_tokenize_exception (struct rspamd_process_exception *ex, GArray *res) g_array_append_val (res, token); token.flags = 0; } + else if (ex->type == RSPAMD_EXCEPTION_INVISIBLE) { + token.original.begin = "!!INV!!"; + token.original.len = sizeof ("!!INV!!") - 1; + token.flags = RSPAMD_STAT_TOKEN_FLAG_EXCEPTION; + + g_array_append_val (res, token); + token.flags = 0; + } } |