Harden controllers and password randomness

Co-authored-by: LeOSW42 <673670+LeOSW42@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-01-24 13:18:35 +00:00
parent fd29d07911
commit 0ef2679808
5 changed files with 87 additions and 28 deletions

View File

@@ -93,8 +93,13 @@ switch ($controller->splitted_url[1]) {
case "elevation_proxy":
if (isset($_GET['location'])) {
if (!preg_match('/^[0-9,\.\|\-]+$/', $_GET['location'])) {
$notfound = 1;
break;
}
$location = urlencode($_GET['location']);
header("Content-Type: application/json;charset=utf-8");
echo(file_get_contents("https://api.opentopodata.org/v1/mapzen?locations=".$_GET['location']));
echo(file_get_contents("https://api.opentopodata.org/v1/mapzen?locations=".$location));
break;
} else {
$notfound = 1;