From 8f7da93a0d21a4ede3e31042fb9d2658ac468f65 Mon Sep 17 00:00:00 2001 From: Andrew Ruthven Date: Sun, 21 Apr 2024 01:12:04 +1200 Subject: [PATCH] Return the Request ID if auth fails Still only return it if in test_mode. --- inc/HTTPAuthSession.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/inc/HTTPAuthSession.php b/inc/HTTPAuthSession.php index 69795eaf..b80f012b 100644 --- a/inc/HTTPAuthSession.php +++ b/inc/HTTPAuthSession.php @@ -106,6 +106,8 @@ class HTTPAuthSession { header('HTTP/1.1 401 Unauthorized', true, 401 ); header('Content-type: text/plain; ; charset="utf-8"' ); + if ( $c->test_mode ) header( "Request-ID: " . request_id() ); + header( $auth_header ); echo 'Please log in for access to this system.'; if ( isset($_SERVER['PHP_AUTH_USER']) ) {