login: status 403 for initial unauthorised redirects
authorMischa POSLAWSKY <perl@shiar.org>
Fri, 1 May 2020 18:10:52 +0000 (20:10 +0200)
committerMischa POSLAWSKY <perl@shiar.org>
Sat, 5 Dec 2020 00:38:53 +0000 (01:38 +0100)
Appropriate error code for original requests.

login/index.php

index 6783a47c9d73d9b9dfeffe42025565ba3e51a889..897346d98275f712f1fdfa8906bacbf2085b4eaa 100644 (file)
@@ -38,6 +38,7 @@ elseif (isset($_GET['logout'])) {
 if (!$User or !$User->login) {
        $Article->title = 'Inloggen';
        if (isset($_REQUEST['goto'])) {
+               if (empty($message)) http_response_code(403);
                $target = ltrim($_REQUEST['goto'], '/');
                $target = new ArchiveArticle("$target.html");