mirror of
https://github.com/foin137/werwolfonline.eu.git
synced 2026-09-14 10:13:52 +00:00
Prepare statements for sql queries, use (int) to avoid nonint inputs
The goal of this edit is to prevent sql injection. For string inputs like player name -> prepare sql statements. For other inputs that are integers -> cast to int via (int)
This commit is contained in:
+1
-1
@@ -5,7 +5,7 @@
|
||||
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');
|
||||
$spielID = $_GET['game'];
|
||||
$spielID = (int)$_GET['game'];
|
||||
|
||||
if ($Result = $mysqli->query("SELECT * FROM ".$spielID."_game"))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user