Fixed a lot of bugs/security issues in the market

+Fixed a bug that permitted to send resourcers to himself
+Fixed a bug that permitted to send resources to invalid villages
+Fixed a bug that permitted to create offerings with 0 resources or
invalid resources type
+Fixed a bug that permitted to accept offerings of other allies
+Fixed a bug that permitted to accept offerings with a too high maxtime
+Fixed a bug that permitted to accept offering from the same village
+Fixed a bug that permitted to accept offering with too few merchants
+Fixed a bug that permitted to accept offerings without the requested
resources
+Fixed a bug that hid offerings with a valid maxtime
+Fixed some bugs relative to errors diplaying
+Added some error
+Some clean-up
This commit is contained in:
iopietro
2018-04-16 23:45:21 +02:00
parent de8859da03
commit e116511c73
7 changed files with 114 additions and 71 deletions
+15 -1
View File
@@ -47,6 +47,20 @@ if($session->plus) {
}
?>
<div class="clear"></div><table id="range" cellpadding="1" cellspacing="1">
<?php
if(isset($_GET['e1']))
{
echo "<p class=\"error2\">".NOT_ENOUGH_RESOURCES."</p>";
}
elseif(isset($_GET['e2']))
{
echo "<p class=\"error2\">".INVALID_OFFER."</p>";
}
elseif(isset($_GET['e3']))
{
echo "<p class=\"error2\">".NOT_ENOUGH_MERCHANTS."</p>";
}
?>
<thead><tr>
<th colspan="5"><a name="h2"></a><?php echo OFFERS_MARKETPLACE;?></th>
</tr>
@@ -95,7 +109,7 @@ switch($market->onsale[$i]['gtype']) {
echo "<td class=\"act none\">".NOT_ENOUGH_MERCHANTS."</td></tr>";
}
else if($session->access != BANNED){
echo "<td class=\"act\"><a href=\"build.php?id=$id&t=1&a=".$session->mchecker."&g=".$market->onsale[$i]['id']."\">".LUMBER."Accept offer</a></td>";
echo "<td class=\"act\"><a href=\"build.php?id=$id&t=1&a=".$session->mchecker."&g=".$market->onsale[$i]['id']."\">Accept offer</a></td>";
}else{
echo "<td class=\"act\"><a href=\"banned.php\">".ACCEP_OFFER."</a></td>";
}