Prevent blank UUIDs from being banned

This fixes a bug with a bad actor getting banned with a blank client UUID and then preventing anyone from joining the server due to a lack of UUID on the Connect Request ban check.
This commit is contained in:
ohayo 2025-02-08 14:37:48 +10:00
parent de142e419e
commit 6d5fff83cf
2 changed files with 6 additions and 2 deletions

View file

@ -189,11 +189,15 @@ namespace TShockAPI.DB
{
List<string> identifiers = new List<string>
{
$"{Identifier.UUID}{player.UUID}",
$"{Identifier.Name}{player.Name}",
$"{Identifier.IP}{player.IP}"
};
if (player.UUID != null && player.UUID.Length > 0)
{
identifiers.Add($"{Identifier.UUID}{player.UUID}");
}
if (player.Account != null)
{
identifiers.Add($"{Identifier.Account}{player.Account.Name}");