make no_auth reporting work
parent
187494cd50
commit
bd7e63b617
|
@ -90,13 +90,18 @@ if ($_SERVER["REQUEST_METHOD"] === "POST") {
|
||||||
);
|
);
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
$fileName = $_GET["user"];
|
if ($mode === "NO_AUTH") {
|
||||||
if (!isset($credentials[$fileName])) {
|
$fileName = "backups.json";
|
||||||
|
} else {
|
||||||
|
$fileName = $_GET["user"];
|
||||||
|
if (!isset($credentials[$fileName])) {
|
||||||
header("HTTP/1.0 404 Not Found");
|
header("HTTP/1.0 404 Not Found");
|
||||||
echo "user not found";
|
echo "user not found";
|
||||||
exit();
|
exit();
|
||||||
|
}
|
||||||
|
$fileName .= ".json";
|
||||||
}
|
}
|
||||||
$fileName .= ".json";
|
|
||||||
header("Content-Type: text/plain");
|
header("Content-Type: text/plain");
|
||||||
$maxAge = isset($_GET["maxage"]) ? intval($_GET["maxage"]) : 28;
|
$maxAge = isset($_GET["maxage"]) ? intval($_GET["maxage"]) : 28;
|
||||||
$maxAge = $maxAge * 60 * 60;
|
$maxAge = $maxAge * 60 * 60;
|
||||||
|
|
Loading…
Reference in New Issue