Kyttias
01-07-2015, 04:23 PM
Items not in shop can be hacked into the shop and bought.
This probably effects at least the entire v1.3.x line if not even earlier.By simply right-clicking and inspecting the quantity field element on the shop page, a user can change the item name field client side and buy items that don't belong to that shop - or any shop, for that matter - so long as they know it's name. Therefore, validation is necessary to confirm that the item does belong in the shop.
In classes/class_itemshop.php, down in public function purchase(), you'll want to fix this.
After $mysidia = Registry::get("mysidia"); you'll want to wrap the rest of the contents in:
if ($item->shop != $this->shopname) Throw new NoPermissionException('Did you really think this item could be bought at this shop?'); else {And close the else right before return $status;.