login: indicate failure in http status codes
[minimedit.git] / login / pass / index.php
index 4fc6543d57fff397a88f720dcba50bcd0d077782..09984acce513349090f6287cc1c0e7e19e04c32a 100644 (file)
@@ -11,6 +11,7 @@ if (isset($_GET['token'])) {
                ];
        }
        else {
+               http_response_code(403);
                print "<p class=warn>Code onjuist, geen toestemming om wachtwoord in te stellen.</p>\n";
                return TRUE;
        }
@@ -29,6 +30,7 @@ if ($_POST) {
                print "<p>Het wachtwoord is aangepast voor <em>{$User['name']}</em>. Voortaan met het nieuwe wachtwoord inloggen.</p>\n\n";
                return;
        }
+       http_response_code(400);
        print "<p class=warn>$error</p>\n\n";
 }