diff --git a/ChangeLog b/ChangeLog index 258796de8..20b4294de 100755 --- a/ChangeLog +++ b/ChangeLog @@ -5,12 +5,16 @@ phpMyAdmin - Changelog $Id$ $Source$ +2001-05-24 Loïc Chapeaux + * lib.inc.php3, line 131+: fixed the authentification failure with advanced + mode and 'register_globals' disabled (bug #425369) + 2001-05-22 Marc Delisle - * Bug #424237: cannot set an enum field to Null + * Bug #424237: cannot set an enum field to Null 2001-05-21 Marc Delisle - * add a message $strTextAreaLength to tell users when a textarea - contents is too large to be editable ( > 32K) + * add a message $strTextAreaLength to tell users when a textarea + contents is too large to be editable ( > 32K) 2001-05-20 Loïc Chapeaux * replaced all require("somefile.php3") and include("somefile.php3") diff --git a/lib.inc.php3 b/lib.inc.php3 index 5901887a8..ff97224f0 100755 --- a/lib.inc.php3 +++ b/lib.inc.php3 @@ -127,11 +127,39 @@ if($server == 0) { if(isset($cfgServer['only_db']) && !empty($cfgServer['only_db'])) $dblist[] = $cfgServer['only_db']; - if($cfgServer['adv_auth']) { - if (empty($PHP_AUTH_USER) && isset($REMOTE_USER)) - $PHP_AUTH_USER=$REMOTE_USER; - if(empty($PHP_AUTH_PW) && isset($REMOTE_PASSWORD)) - $PHP_AUTH_PW=$REMOTE_PASSWORD; + if ($cfgServer['adv_auth']) { + // Grab the $PHP_AUTH_USER variable whatever are the values of the + // 'register_globals' and the 'variables_order' directives + if (empty($PHP_AUTH_USER)) { + if (!empty($HTTP_SERVER_VARS) && isset($HTTP_SERVER_VARS['PHP_AUTH_USER'])) { + $PHP_AUTH_USER = $HTTP_SERVER_VARS['PHP_AUTH_USER']; + } + else if (isset($REMOTE_USER)) { + $PHP_AUTH_USER = $REMOTE_USER; + } + else if (!empty($HTTP_ENV_VARS) && isset($HTTP_ENV_VARS['REMOTE_USER'])) { + $REMOTE_USER = $HTTP_ENV_VARS['REMOTE_USER']; + } + else if (@getenv('REMOTE_USER')) { + $REMOTE_USER = getenv('REMOTE_USER'); + } + } + // Grab the $PHP_AUTH_PW variable whatever are the values of the + // 'register_globals' and the 'variables_order' directives + if (empty($PHP_AUTH_PW)) { + if (!empty($HTTP_SERVER_VARS) && isset($HTTP_SERVER_VARS['PHP_AUTH_PW'])) { + $PHP_AUTH_PW = $HTTP_SERVER_VARS['PHP_AUTH_PW']; + } + else if (isset($REMOTE_PASSWORD)) { + $PHP_AUTH_PW = $REMOTE_PASSWORD; + } + else if (!empty($HTTP_ENV_VARS) && isset($HTTP_ENV_VARS['REMOTE_PASSWORD'])) { + $PHP_AUTH_PW = $HTTP_ENV_VARS['REMOTE_PASSWORD']; + } + else if (@getenv('REMOTE_PASSWORD')) { + $PHP_AUTH_PW = getenv('REMOTE_PASSWORD'); + } + } if(!isset($old_usr)) { if(empty($PHP_AUTH_USER)) {