Improved endpoint security (Fixes #35 )

This commit is contained in:
Suiram1701
2025-04-22 18:08:52 +00:00
parent 0c42f67d77
commit 5e6f420e9e
4 changed files with 41 additions and 24 deletions

View File

@@ -18,19 +18,20 @@ werwolfonline, a php web game
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
include "includes/includes.php";
header("Content-Type: text/html; charset=utf-8");
header('Cache-Control: no-cache, no-store, max-age=0, must-revalidate');
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); // Date in the past
header('Pragma: no-cache');
include "includes/includes.php";
$spielID = (int)$_GET['game'];
$id = (int)$_GET['id'];
if ($Result = $mysqli->query("SELECT * FROM ".$spielID."_spieler WHERE id = $id"))
$verifizierungsNr = (int)$_COOKIE['verifizierungsnr'];
if ($Result = $mysqli->query("SELECT * FROM ".$spielID."_spieler WHERE id = $id AND verifizierungsnr = $verifizierungsNr"))
{
$temp = $Result->fetch_assoc();
echo $temp['reload'];
}
?>