From d3a46e209cea6da93c319535e82a50c4c4af35f5 Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Thu, 1 Nov 2007 20:59:48 +0000 Subject: [PATCH] patch #1821154, HTTP authentication: fix auth working with php/mod_fastcgi --- ChangeLog | 2 ++ libraries/auth/http.auth.lib.php | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 8b4586ac3..bec0b1a43 100644 --- a/ChangeLog +++ b/ChangeLog @@ -17,6 +17,8 @@ $HeadURL: https://phpmyadmin.svn.sourceforge.net/svnroot/phpmyadmin/trunk/phpMyA 2.11.3.0 (not yet released) - patch #1818389 to remove a notice (failed to flush buffer), thanks to Bertrand +- patch #1821154, HTTP authentication: fix auth working with php/mod_fastcgi, + thanks to yarodin 2.11.2.0 (2007-10-27) - patch #1791576 HTTP auth: support REDIRECT_REMOTE_USER, thanks to Allard diff --git a/libraries/auth/http.auth.lib.php b/libraries/auth/http.auth.lib.php index ea9a9ac46..856ce1ef7 100644 --- a/libraries/auth/http.auth.lib.php +++ b/libraries/auth/http.auth.lib.php @@ -36,7 +36,9 @@ function PMA_auth() $server_message = preg_replace('/[^\x20-\x7e]/i', '', $server_message); header('WWW-Authenticate: Basic realm="phpMyAdmin ' . $server_message . '"'); header('HTTP/1.0 401 Unauthorized'); - header('status: 401 Unauthorized'); + if (php_sapi_name() !== 'cgi-fcgi') { + header('status: 401 Unauthorized'); + } // Defines the charset to be used header('Content-Type: text/html; charset=' . $GLOBALS['charset']);