Revert "client misc test"

This reverts commit c56d091862.
This commit is contained in:
luis
2026-11-14 17:44:12 -03:00
parent 0bd8bdb3f8
commit c56fae705d
3 changed files with 3 additions and 18 deletions
+2 -9
View File
@@ -752,16 +752,9 @@ void WorldSession::HandleUpdateAccountData(WorldPackets::ClientConfig::UserClien
return;
}
if (packet.Size > MAX_ACCOUNT_DATA_SIZE)
if (packet.Size > 0xFFFF)
{
TC_LOG_WARN("network", "UAD: Account data packet too big, size {} (compressed {}), type {} - not stored",
packet.Size, packet.CompressedData.size(), packet.DataType);
WorldPackets::ClientConfig::UpdateAccountDataComplete updateAccountDataComplete;
updateAccountDataComplete.Player = packet.PlayerGuid;
updateAccountDataComplete.DataType = packet.DataType;
updateAccountDataComplete.Result = 0;
SendPacket(updateAccountDataComplete.Write());
TC_LOG_ERROR("network", "UAD: Account data packet too big, size {}", packet.Size);
return;
}
-4
View File
@@ -1328,10 +1328,6 @@ enum AccountDataType
#define NUM_ACCOUNT_DATA_TYPES 20
// decompressed size accepted for a single client account cache
// (edit mode layouts grow past 64 KB, keep the `data` columns above BLOB if you raise this)
#define MAX_ACCOUNT_DATA_SIZE 0x20000
#define ALL_ACCOUNT_DATA_CACHE_MASK 0x000FFFFFu
#define GLOBAL_CACHE_MASK 0x000BA515u
#define PER_CHARACTER_CACHE_MASK 0x00045AEAu
+1 -5
View File
@@ -345,11 +345,7 @@ bool WorldSocket::ReadHeaderHandler()
_authCrypt.PeekDecryptRecv(reinterpret_cast<uint8*>(&header->EncryptedOpcode), sizeof(encryptedOpcode));
// CMSG_HOTFIX_REQUEST can be much larger than normal packets, allow receiving it once per session
bool const isHotfixRequest = header->EncryptedOpcode == CMSG_HOTFIX_REQUEST && header->Size <= 0x100000 && _canRequestHotfixes;
// the client uploads large account caches (edit mode layouts) on logout, do not kill the socket for them
bool const isAccountData = header->EncryptedOpcode == CMSG_UPDATE_ACCOUNT_DATA && header->Size <= 0x800000;
if (!isHotfixRequest && !isAccountData)
if (header->EncryptedOpcode != CMSG_HOTFIX_REQUEST || header->Size > 0x100000 || !_canRequestHotfixes)
{
TC_LOG_ERROR("network", "WorldSocket::ReadHeaderHandler(): client {} sent malformed packet (size: {}, opcode {})",
GetRemoteIpAddress(), header->Size, uint32(header->EncryptedOpcode));