From dceaed615cc4046d0f4145d17580fa1b7471c538 Mon Sep 17 00:00:00 2001 From: Mischa POSLAWSKY Date: Mon, 22 Feb 2021 01:37:15 +0100 Subject: [PATCH] page: indicate repost status in http redirects Replace generic status 302 by specific HTTP2 options. In particular prevent unrelated posts after login. --- login/index.php | 2 +- page.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/login/index.php b/login/index.php index 38b7c23..85dc2f5 100644 --- a/login/index.php +++ b/login/index.php @@ -59,7 +59,7 @@ if (!$User or !$User->login) { if (isset($_REQUEST['goto'])) { $target = ltrim($_REQUEST['goto'], '/'); - abort("/$target", 302); + abort("/$target", '303 Return'); } if (isset($Page->raw)) { diff --git a/page.php b/page.php index 9f9ce62..e634a38 100644 --- a/page.php +++ b/page.php @@ -16,7 +16,7 @@ $staticpage = "$request.html"; if (file_exists($staticpage)) { if (is_link($staticpage)) { $target = preg_replace('/\.html$/', '', readlink($staticpage)); - abort($target, '302 Shorthand'); + abort($target, '307 Shorthand'); } } elseif (file_exists("$request/index.html")) { -- 2.30.0