GameCult.Networking: refuse a write_admitted messageId without a letter or number, with a Default_Ignorable code point, or with invalid UTF-8
Raw compare. .NET Unicode categories for L/N, an embedded Default_Ignorable range table (Unicode 16.0). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
d1a4ebdd68
commit
d546ef9c7f
2 changed files with 70 additions and 1 deletions
|
|
@ -35,7 +35,7 @@ namespace GameCult.Networking.Tests
|
|||
.Single(c => c.GetProperty("name").GetString() == name);
|
||||
var id = string.Concat(Enumerable.Repeat(
|
||||
string.Concat(vector.GetProperty("codePoints").EnumerateArray()
|
||||
.Select(cp => char.ConvertFromUtf32(Convert.ToInt32(cp.GetString(), 16)))),
|
||||
.Select(cp => Convert.ToInt32(cp.GetString(), 16)).Where(point => point < 0xD800 || point > 0xDFFF).Select(char.ConvertFromUtf32)),
|
||||
vector.TryGetProperty("repeat", out var repeat) ? repeat.GetInt32() : 1));
|
||||
var bytes = vector.TryGetProperty("wireHex", out var wire)
|
||||
? Convert.FromHexString(wire.GetString()!)
|
||||
|
|
|
|||
Loading…
Reference in a new issue