From e04eb6fcc61737c1a159159932729ac2905d73cc Mon Sep 17 00:00:00 2001 From: 13xforever Date: Wed, 14 Jun 2023 22:19:32 +0500 Subject: [PATCH 1/2] update deps --- Clients/CirrusCiClient/CirrusCiClient.csproj | 2 +- Clients/CompatApiClient/CompatApiClient.csproj | 2 +- Clients/GithubClient/GithubClient.csproj | 2 +- Clients/IrdLibraryClient/IrdLibraryClient.csproj | 2 +- CompatBot/CompatBot.csproj | 14 +++++++------- Tests/Tests.csproj | 2 +- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Clients/CirrusCiClient/CirrusCiClient.csproj b/Clients/CirrusCiClient/CirrusCiClient.csproj index 727b0340..26148914 100644 --- a/Clients/CirrusCiClient/CirrusCiClient.csproj +++ b/Clients/CirrusCiClient/CirrusCiClient.csproj @@ -11,6 +11,6 @@ - + \ No newline at end of file diff --git a/Clients/CompatApiClient/CompatApiClient.csproj b/Clients/CompatApiClient/CompatApiClient.csproj index 6a5ab98c..d5d8c4b7 100644 --- a/Clients/CompatApiClient/CompatApiClient.csproj +++ b/Clients/CompatApiClient/CompatApiClient.csproj @@ -17,7 +17,7 @@ - + diff --git a/Clients/GithubClient/GithubClient.csproj b/Clients/GithubClient/GithubClient.csproj index 1217ec4c..52a23d4a 100644 --- a/Clients/GithubClient/GithubClient.csproj +++ b/Clients/GithubClient/GithubClient.csproj @@ -6,7 +6,7 @@ - + diff --git a/Clients/IrdLibraryClient/IrdLibraryClient.csproj b/Clients/IrdLibraryClient/IrdLibraryClient.csproj index eca13a0b..baa6067b 100644 --- a/Clients/IrdLibraryClient/IrdLibraryClient.csproj +++ b/Clients/IrdLibraryClient/IrdLibraryClient.csproj @@ -7,7 +7,7 @@ - + diff --git a/CompatBot/CompatBot.csproj b/CompatBot/CompatBot.csproj index 25044ff9..9a78b9d0 100644 --- a/CompatBot/CompatBot.csproj +++ b/CompatBot/CompatBot.csproj @@ -43,28 +43,28 @@ - + - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive - + - - - + + + diff --git a/Tests/Tests.csproj b/Tests/Tests.csproj index bc79037d..141db526 100644 --- a/Tests/Tests.csproj +++ b/Tests/Tests.csproj @@ -6,7 +6,7 @@ - + all From 1f9bbdd6ae9aec1160c7bce638ad1b0ddaf12ecf Mon Sep 17 00:00:00 2001 From: 13xforever Date: Thu, 6 Jul 2023 00:12:34 +0500 Subject: [PATCH 2/2] strip private use symbols explicitly for zalgo --- CompatBot/EventHandlers/UsernameZalgoMonitor.cs | 1 + Tests/ZalgoTests.cs | 1 + 2 files changed, 2 insertions(+) diff --git a/CompatBot/EventHandlers/UsernameZalgoMonitor.cs b/CompatBot/EventHandlers/UsernameZalgoMonitor.cs index 15e84086..11464ba8 100644 --- a/CompatBot/EventHandlers/UsernameZalgoMonitor.cs +++ b/CompatBot/EventHandlers/UsernameZalgoMonitor.cs @@ -158,6 +158,7 @@ public static string StripZalgo(string displayName, string? userName, ulong user case UnicodeCategory.Control: case UnicodeCategory.Format: + case UnicodeCategory.PrivateUse: break; case UnicodeCategory.Surrogate: diff --git a/Tests/ZalgoTests.cs b/Tests/ZalgoTests.cs index 0c2baf3b..b3b49071 100644 --- a/Tests/ZalgoTests.cs +++ b/Tests/ZalgoTests.cs @@ -81,6 +81,7 @@ public async Task RoleSortTestAsync() [TestCase("𐎄𐎝𐎪𐎼", true, "Ugaritic and Old Persian blocks")] [TestCase("͔", true, "Combining marks")] [TestCase("҉҉҉҉", true, "Combining sign")] + [TestCase("᲼᲼᲼᲼᲼᲼᲼᲼᲼ ", true, "Private block")] public void ZalgoDetectionTest(string name, bool isBad, string comment = null) { Assert.That(UsernameZalgoMonitor.NeedsRename(name), Is.EqualTo(isBad), comment);