Validate arguments further

This commit is contained in:
ruan 2015-11-01 12:56:26 +02:00
parent 0b5aa7f0fb
commit 335229b0d1
3 changed files with 3 additions and 3 deletions

View File

@ -73,7 +73,7 @@ class Check {
} }
} }
if (isset($_GET['name'], $_GET['table'])) { if (isset($_GET['name'], $_GET['table']) && is_string($_GET['name']) && is_string($_GET['table'])) {
$check = new Check(); $check = new Check();
$check->run($_GET['name'], $_GET['table']); $check->run($_GET['name'], $_GET['table']);
} }

View File

@ -58,7 +58,7 @@ class History {
$page = new Page("history"); $page = new Page("history");
isset($_GET['uuid']) or die("Missing arguments (uuid)."); isset($_GET['uuid']) && is_string($_GET['uuid']) or die("Missing arguments (uuid).");
$staffhistory = (isset($_GET['staffhistory']) && $_GET['staffhistory'] === "1"); $staffhistory = (isset($_GET['staffhistory']) && $_GET['staffhistory'] === "1");

View File

@ -114,7 +114,7 @@ if ((substr($_SERVER['SCRIPT_NAME'], -strlen("info.php"))) !== "info.php") {
return; return;
} }
isset($_GET['type'], $_GET['id']) or die("Missing arguments (type, id)."); isset($_GET['type'], $_GET['id']) && is_string($_GET['type']) && is_string($_GET['id']) or die("Missing arguments (type, id).");
$type = $_GET['type']; $type = $_GET['type'];
$id = $_GET['id']; $id = $_GET['id'];