add hint to user input

master
Dirk Heilig 2023-10-12 09:34:44 +02:00
parent 652559bbe3
commit 01a56069d8
1 changed files with 8 additions and 0 deletions

View File

@ -92,6 +92,14 @@ if ($_SERVER["REQUEST_METHOD"] === "POST") {
} }
if ($mode === "NO_AUTH") { if ($mode === "NO_AUTH") {
$fileName = "backups.json"; $fileName = "backups.json";
} elseif (!isset($_GET["user"])) {
header("HTTP/1.0 404 Not Found"); ?>
<form method="get">
no user specified
<input type="text" name="user" placeholder="username">
<input type="submit">
</form>
<?php exit();
} else { } else {
$fileName = strtolower($_GET["user"]); $fileName = strtolower($_GET["user"]);
if (!isset($credentials[$fileName])) { if (!isset($credentials[$fileName])) {