diff --git a/index.php b/index.php index 14457fb..08c39de 100644 --- a/index.php +++ b/index.php @@ -76,6 +76,9 @@ $VARS += $urlkeyvaluepairs; if (count($route) > 0 && strpos($route[count($route) - 1], "?") === 0) { $morevars = explode("&", substr($route[count($route) - 1], 1)); foreach ($morevars as $var) { + if (strpos($var, "=") === false) { + continue; + } $key = explode("=", $var, 2)[0]; $val = explode("=", $var, 2)[1]; $VARS[$key] = $val; @@ -100,7 +103,7 @@ if (!isset($APIS[$ENDPOINT])) { exit(file_get_contents(__DIR__ . "/publicsite/$ENDPOINT.html")); } else { http_response_code(404); - die("404 Requested endpoint not known."); + die("404 Requested endpoint (" . htmlentities($ENDPOINT) . ") not known."); } }