From 60bc26c5a3ec56a234c85aaaff839bd22a66dc6e Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Thu, 19 Mar 2020 15:26:31 +0000 Subject: [PATCH] [Minor] Remove UCP from TLD parsing --- src/libutil/multipattern.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/libutil/multipattern.c b/src/libutil/multipattern.c index c348ac6b2..f1295a9e4 100644 --- a/src/libutil/multipattern.c +++ b/src/libutil/multipattern.c @@ -334,7 +334,12 @@ rspamd_multipattern_add_pattern_len (struct rspamd_multipattern *mp, fl |= HS_FLAG_CASELESS; } if (mp->flags & RSPAMD_MULTIPATTERN_UTF8) { - fl |= HS_FLAG_UTF8|HS_FLAG_UCP; + if (mp->flags & RSPAMD_MULTIPATTERN_TLD) { + fl |= HS_FLAG_UTF8; + } + else { + fl |= HS_FLAG_UTF8 | HS_FLAG_UCP; + } } if (mp->flags & RSPAMD_MULTIPATTERN_DOTALL) { fl |= HS_FLAG_DOTALL; -- 2.39.5