From 0b1ce0fa0512ac3bee9fba19f18f8a86898ded01 Mon Sep 17 00:00:00 2001 From: hondacrx Date: Wed, 15 Jun 2022 16:14:42 -0400 Subject: [PATCH] Core/PacketIO: Require valid WorldSession for CMSG_KEEP_ALIVE Port From (https://github.com/TrinityCore/TrinityCore/commit/88b6d75bcedb6c8ede88715c7c3b23e3eeb682f4) --- Source/Game/Networking/WorldSocket.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Source/Game/Networking/WorldSocket.cs b/Source/Game/Networking/WorldSocket.cs index 9e857c8bf..d1d8a4159 100644 --- a/Source/Game/Networking/WorldSocket.cs +++ b/Source/Game/Networking/WorldSocket.cs @@ -310,8 +310,13 @@ namespace Game.Networking return ReadDataHandlerResult.WaitingForQuery; case ClientOpcodes.KeepAlive: if (_worldSession != null) + { _worldSession.ResetTimeOutTime(true); - break; + return ReadDataHandlerResult.Ok; + } + + Log.outError(LogFilter.Network, $"WorldSocket::ReadDataHandler: client {GetRemoteIpAddress()} sent CMSG_KEEP_ALIVE without being authenticated"); + return ReadDataHandlerResult.Error; case ClientOpcodes.LogDisconnect: break; case ClientOpcodes.EnableNagle: