X-Git-Url: http://git.shiar.net/minimedit.git/blobdiff_plain/85536cb70f85743054b6b3abfc36d05662e6878d..20ead233cabc8fefcd86bd99f08dadc261669300:/login/index.php diff --git a/login/index.php b/login/index.php index 40fcb61..8b4c223 100644 --- a/login/index.php +++ b/login/index.php @@ -10,10 +10,12 @@ if (isset($_POST['mail'])) { $message = "Er is een e-mail verstuurd naar $inputq."; } else { + http_response_code(404); $message = "E-mailadres $inputq is nergens ingesteld."; } } catch (Exception $e) { + http_response_code(500); $message = "E-mail kon niet verstuurd worden." . " Probeer het later nog eens of neem contact op."; } @@ -23,6 +25,7 @@ elseif (isset($_POST['login'])) { login_setcookie(); } else { + http_response_code(403); $message = 'Ongeldige gebruikersnaam of wachtwoord.'; } } @@ -39,9 +42,9 @@ if (empty($User)) { return TRUE; } -if (isset($_GET['goto'])) { +if (isset($_REQUEST['goto'])) { ob_clean(); - $target = ltrim($_GET['goto'], '/'); + $target = ltrim($_REQUEST['goto'], '/'); header("Location: /$target"); http_response_code(302); exit; @@ -49,5 +52,5 @@ if (isset($_GET['goto'])) { if (empty($Args) and !empty($User['admin'])) { include_once 'login/admin.html'; - include_once 'login/admin/index.php'; } +