X-Git-Url: https://git.sur5r.net/?p=bacula%2Fdocs;a=blobdiff_plain;f=docs%2Fhome-page%2Fen%2Finc%2Fheader.php;h=49bb2ef78b8475530188316075eed16cf4e403d0;hp=7d5bd617620ab8f21c463a0d95fdeb6c9a822d33;hb=HEAD;hpb=f8aeb0484307d4b3c6bb43edb054c0466dbd7a58 diff --git a/docs/home-page/en/inc/header.php b/docs/home-page/en/inc/header.php index 7d5bd617..49bb2ef7 100644 --- a/docs/home-page/en/inc/header.php +++ b/docs/home-page/en/inc/header.php @@ -10,6 +10,12 @@ * */ isset($page) || $page = "home"; // default page to show + if (!preg_match("/^[a-zA-Z0-9_\-]+$/", $page)) { + sleep(5); + header("HTTP/1.0 404 Not Found"); + exit; + } + $page_directory = "pages"; // directory with pages $page_current = "$page_directory/$page.php"; @@ -20,13 +26,13 @@ */ session_start(); if(isset($_POST['username']) and isset($_POST['password'])) { - $user = $_POST['username']; - $pass = $_POST['password']; + $user = $_POST['username']; + $pass = $_POST['password']; - if($user == $pass) { - $_SESSION['user'] = $user; - $_SESSION['logged_in'] = true; - } + if($user == $pass) { + $_SESSION['user'] = $user; + $_SESSION['logged_in'] = true; + } } /** @@ -34,19 +40,19 @@ */ $spath = dirname($_SERVER['SCRIPT_NAME']); if(strlen($spath) < 2) - $spath = ""; + $spath = ""; ?> - Bacula, the Network Backup Tool for Linux, Unix, and Windows + Bacula, Open Source Backup, Enterprise ready, Network Backup Tool for Linux, Unix, and Windows - - - - + + + + @@ -56,18 +62,23 @@