This commit is contained in:
Adrien MALINGREY 2025-05-19 18:15:11 +02:00
parent d9415c7fa6
commit 341b017c01
2 changed files with 8 additions and 3 deletions

View File

@ -3,12 +3,17 @@
$path = realpath($basedir . DIRECTORY_SEPARATOR . ltrim(urldecode($_SERVER["QUERY_STRING"]), '/'));
if (strpos($path, $basedir) !== 0 || substr($path, -4) != ".cfg") {
http_response_code(403);
die();
http_response_code(404);
die("Fichier non trouvé");
}
$conf = file_get_contents($path);
if ($conf === false) {
http_error_code(404);
die("Fichier non trouvé");
}
preg_match("/ sysname ([\w-]+)/", $conf, $sysname);
preg_match("/ip address ([\d.]+)/", $conf, $address);
$startPattern = "(?<=\n)";

View File

@ -60,7 +60,7 @@ h2 {
}
.file-list li {
margin-left: 1rem;
margin-left: 1.2rem;
}
.file-list a::before {