Support FastGCI in http auth (patch #1192219)
This commit is contained in:
@@ -5,6 +5,10 @@ phpMyAdmin - Changelog
|
||||
$Id$
|
||||
$Source$
|
||||
|
||||
2005-07-10 Michal Čihař <michal@cihar.com>
|
||||
* libraries/auth/http.auth.lib.php: Support FastGCI in http auth (patch
|
||||
#1192219)
|
||||
|
||||
2005-07-10 Marc Delisle <lem9@users.sourceforge.net>
|
||||
* libraries/display_tbl.lib.php: bug #1235473 display_tbl.lib.php,
|
||||
Undefined variable order_img
|
||||
@@ -34,7 +38,7 @@ $Source$
|
||||
instructions, thanks to Isaac Bennetch - ibennetch
|
||||
|
||||
2005-06-30 Marc Delisle <lem9@users.sourceforge.net>
|
||||
* lang/hungarian update, thanks to Mih<EFBFBD>ly M<EFBFBD>sz<EFBFBD>ros <necronix@freemail.hu>
|
||||
* lang/hungarian update, thanks to Mihály Mészáros <necronix@freemail.hu>
|
||||
* lang/japanese: updated, thanks to Tadashi Jokagi (elf2000)
|
||||
* lang/chinese_traditional: Updates, thanks to Siu Sun
|
||||
* lang/catalan update, thanks to Xavier Navarro (xavin).
|
||||
|
@@ -186,8 +186,7 @@ function PMA_auth_check()
|
||||
}
|
||||
}
|
||||
// Gets authenticated user settings with IIS
|
||||
if (empty($PHP_AUTH_USER) && empty($PHP_AUTH_PW)
|
||||
&& function_exists('base64_decode')) {
|
||||
if (empty($PHP_AUTH_USER) && empty($PHP_AUTH_PW)) {
|
||||
if (!empty($HTTP_AUTHORIZATION)
|
||||
&& substr($HTTP_AUTHORIZATION, 0, 6) == 'Basic ') {
|
||||
list($PHP_AUTH_USER, $PHP_AUTH_PW) = explode(':', base64_decode(substr($HTTP_AUTHORIZATION, 6)));
|
||||
@@ -203,6 +202,20 @@ function PMA_auth_check()
|
||||
}
|
||||
} // end IIS
|
||||
|
||||
// Gets authenticated user settings with FastCGI
|
||||
// set FastCGI option '-pass-header Authorization'
|
||||
if (empty($PHP_AUTH_USER) && empty($PHP_AUTH_PW)) {
|
||||
if (!empty($_ENV)
|
||||
&& isset($_ENV['Authorization'])
|
||||
&& substr($_ENV['Authorization'], 0, 6) == 'Basic ') {
|
||||
list($PHP_AUTH_USER, $PHP_AUTH_PW) = explode(':', base64_decode(substr($_ENV['Authorization'], 6)));
|
||||
}
|
||||
else if (@getenv('Authorization')
|
||||
&& substr(getenv('Authorization'), 0, 6) == 'Basic ') {
|
||||
list($PHP_AUTH_USER, $PHP_AUTH_PW) = explode(':', base64_decode(substr(getenv('Authorization'), 6)));
|
||||
}
|
||||
} // end FastCGI
|
||||
|
||||
// User logged out -> ensure the new username is not the same
|
||||
if (!empty($old_usr)
|
||||
&& (isset($PHP_AUTH_USER) && $old_usr == $PHP_AUTH_USER)) {
|
||||
|
Reference in New Issue
Block a user