fix(Core/Handlers): Properly limit equipment set name length to client maximum. (#23151)
This commit is contained in:
parent
8d2f307483
commit
d237ea6552
1 changed files with 12 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue