diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-03-26 13:04:50 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-03-26 13:04:50 +0100 |
commit | c9f14aba4d6c263deee8fb17615db80a63f6be55 (patch) | |
tree | 1b82b47cca5084c3c8d1b778c2907db445bfe2fd /src/libutil/str_util.h | |
parent | 08bb2e8e8c39dbaa9bce29a227eb875f5999c941 (diff) | |
download | rspamd-c9f14aba4d6c263deee8fb17615db80a63f6be55.tar.gz rspamd-c9f14aba4d6c263deee8fb17615db80a63f6be55.zip |
[Feature] Deal with unnormalised Unicode obfuscation
Diffstat (limited to 'src/libutil/str_util.h')
-rw-r--r-- | src/libutil/str_util.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/libutil/str_util.h b/src/libutil/str_util.h index ab97555ac..68ec5f0bd 100644 --- a/src/libutil/str_util.h +++ b/src/libutil/str_util.h @@ -361,4 +361,14 @@ rspamd_str_has_8bit (const guchar *beg, gsize len) return FALSE; } +/** + * Gets a string in UTF8 and normalises it to NFKC_Casefold form + * @param pool optional memory pool used for logging purposes + * @param start + * @param len + * @return TRUE if a string has been normalised + */ +gboolean rspamd_normalise_unicode_inplace (rspamd_mempool_t *pool, + gchar *start, guint *len); + #endif /* SRC_LIBUTIL_STR_UTIL_H_ */ |