From dd0969a9f060781f8e81d80be6326576ffe9985f Mon Sep 17 00:00:00 2001 From: dingo Date: Fri, 30 Jan 2026 23:54:11 -0500 Subject: [PATCH] web client getting bouned --- Game/Dungeon/DungeonHandler.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Game/Dungeon/DungeonHandler.cs b/Game/Dungeon/DungeonHandler.cs index f869fde..b37776a 100644 --- a/Game/Dungeon/DungeonHandler.cs +++ b/Game/Dungeon/DungeonHandler.cs @@ -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; }