fix(Core/Handlers): Properly limit equipment set name length to client maximum. (#23151)

This commit is contained in:
Benjamin Jackson
2025-10-09 14:10:43 -04:00
committed by GitHub
parent 8d2f307483
commit d237ea6552

View File

@@ -1754,9 +1754,21 @@ void WorldSession::HandleEquipmentSetSave(WorldPacket& recvData)
std::string name;
recvData >> name;
if (name.length() > 16) // Client limitation
{
LOG_ERROR("entities.player.cheat", "Character GUID {} tried to create equipment set {} with too long a name!", _player->GetGUID().ToString(), setGuid);
return;
}
std::string iconName;
recvData >> iconName;
if (iconName.length() > 100) // DB limitation
{
LOG_ERROR("entities.player.cheat", "Character GUID {} tried to create equipment set {} with too long an icon name!", _player->GetGUID().ToString(), setGuid);
return;
}
EquipmentSet eqSet;
eqSet.Guid = setGuid;