diff --git a/api.php b/api.php index fa87a4c..9297d23 100644 --- a/api.php +++ b/api.php @@ -62,7 +62,6 @@ if(!array_key_exists("game", $query)||gettype($query["game"])!="string"||strlen( require(__DIR__."/phplib/libvar_gsec.php"); $game=$query["game"]; -$team_token=$query["ttoken"]; if(!array_key_exists($game, $gsecret_l)) { gen_error_400("game '".$game."' is not found in config file."); @@ -85,6 +84,7 @@ if(!array_key_exists("ttoken", $query)||gettype($query["ttoken"])!="string"||str exit; } +$team_token=$query["ttoken"]; //verify the [game, team-hash] pair (team_token auth)