fix(Core/Handlers): Properly limit equipment set name length to client maximum. (#23151)
This commit is contained in:
@@ -1754,9 +1754,21 @@ void WorldSession::HandleEquipmentSetSave(WorldPacket& recvData)
|
|||||||
std::string name;
|
std::string name;
|
||||||
recvData >> 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;
|
std::string iconName;
|
||||||
recvData >> 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;
|
EquipmentSet eqSet;
|
||||||
|
|
||||||
eqSet.Guid = setGuid;
|
eqSet.Guid = setGuid;
|
||||||
|
|||||||
Reference in New Issue
Block a user