check game ID on AJAX communications

This commit is contained in:
gnieark 2016-06-12 01:07:30 +02:00
parent 0e8ac74417
commit ab4cd8eb3a

View File

@ -65,14 +65,9 @@ switch ($_POST['act']){
get_IA_Response($_SESSION['bot2']['url'],$params[1]); //don't care about result
//echo "plop".json_encode($_SESSION['map']);
case "fight":
if(
($_SESSION['game'] <> "connectFou") || ((!$new) && ($_POST['gameId'] <> $_SESSION['matchId'))
){
if(($_SESSION['game'] <> "connectFou") || ((!$new) && ($_POST['gameId'] <> $_SESSION['matchId']))){
error(500,"game non found");
}