Fixed an exploit in the market

+Fixed an exploit that permitted to gain an infinite amount of resources
This commit is contained in:
iopietro
2018-04-21 17:53:59 +02:00
parent 19dfd345f6
commit e9def19bd9
2 changed files with 5 additions and 5 deletions
+2 -2
View File
@@ -45,8 +45,8 @@ class Market
else if(isset($get['t']) && $get['t'] == 2 && isset($get['a']) && $get['a'] == 5 && isset($get['del']))
{
//GET ALL FIELDS FROM MARKET
$type = $database->getMarketField($village->wid, "gtype");
$amt = $database->getMarketField($village->wid, "gamt");
$type = $database->getMarketField($village->wid, $get['del'], "gtype");
$amt = $database->getMarketField($village->wid, $get['del'], "gamt");
$database->getResourcesBack($village->wid, $type, $amt);
$database->addMarket($village->wid, $get['del'], 0, 0, 0, 0, 0, 0, 1);
header("Location: build.php?id=".$get['id']."&t=2");