web client getting bouned

This commit is contained in:
dingo
2026-01-30 23:54:11 -05:00
parent 490a307f92
commit dd0969a9f0
+5 -1
View File
@@ -159,8 +159,12 @@ public sealed partial class DungeonHandler : IClientMessageHandler
return;
}
// All dungeon operations require authentication
if (!_sessions.TryGet(connection.Id, out var accountId, out _) && opCode != DungeonOpCodes.ASSET_MANIFEST_REQUEST && opCode != OpCodes.PONG)
if (!_sessions.TryGet(connection.Id, out var accountId, out _))
{
// Ignore stray input before auth to avoid booting the client during connect
if (opCode is >= DungeonOpCodes.DUNGEON_INPUT_MOVE and <= DungeonOpCodes.DUNGEON_INPUT_FIRE_PROJECTILE)
return;
await SendErrorAsync(connection, $"auth_required for packet: {opCode}", ct);
return;
}