Core/Entities: Fix exploit/crash in inventory-handling (CMSG_OPEN_ITEM) -thanks to leak
(Adds a scrutiny-based check to baghandling: don't allow placing items in bags that are not "usable" as regular bags) --HG-- branch : trunk
This commit is contained in:
@@ -221,6 +221,15 @@ void WorldSession::HandleOpenItemOpcode(WorldPacket& recvPacket)
|
||||
return;
|
||||
}
|
||||
|
||||
// Verify that the bag is an actual bag that can be used "normally"
|
||||
if(!(proto->Flags & ITEM_PROTO_FLAG_OPENABLE))
|
||||
{
|
||||
pUser->SendEquipError(EQUIP_ERR_CANT_DO_RIGHT_NOW, pItem, NULL);
|
||||
sLog.outError("Possible hacking attempt: Player %s [guid: %u] tried to open item [guid: %u, entry: %u] which is not openable!",
|
||||
pUser->GetName(), pUser->GetGUIDLow(), pItem->GetGUIDLow(), proto->ItemId);
|
||||
return;
|
||||
}
|
||||
|
||||
// locked item
|
||||
uint32 lockId = proto->LockID;
|
||||
if (lockId)
|
||||
|
||||
Reference in New Issue
Block a user