* libraries/common.lib.php3: if $cfg['PmaAbsoluteUri'] is empty and

port == 80 or port == 443, do not add ":80" or ":443" anymore to the
      generated URL -> prevents a double password query with some browsers
      (Safari) in case of http authentication.  (tested with https, http and
      http running on port 8080)
This commit is contained in:
Olivier Müller
2003-02-24 15:42:20 +00:00
parent 058d9a26ec
commit a36cefbbeb
2 changed files with 18 additions and 3 deletions

View File

@@ -5,6 +5,13 @@ phpMyAdmin - Changelog
$Id$
$Source$
2003-02-24 Olivier L. M<>ller <om@omnis.ch>
* libraries/common.lib.php3: if $cfg['PmaAbsoluteUri'] is empty and
port == 80 or port == 443, do not add ":80" or ":443" anymore to the
generated URL -> prevents a double password query with some browsers
(Safari) in case of http authentication. (tested with https, http and
http running on port 8080)
2003-02-24 Michal Cihar <nijel@users.sourceforge.net>
* tbl_change.php3, tbl_replace_fields.php3: Move magic words used for
fields type into special variable. Fixes #647689.

View File

@@ -523,9 +523,17 @@ h1 {font-family: sans-serif; font-size: large; font-weight: bold}
if (empty($cfg['PmaAbsoluteUri'])) {
$port_in_HTTP_HOST = (strpos($HTTP_SERVER_VARS['HTTP_HOST'], ':') > 0);
$cfg['PmaAbsoluteUri'] = ((!empty($HTTP_SERVER_VARS['HTTPS']) && strtolower($HTTP_SERVER_VARS['HTTPS']) != 'off') ? 'https' : 'http') . '://'
. $HTTP_SERVER_VARS['HTTP_HOST']
. ((!empty($HTTP_SERVER_VARS['SERVER_PORT']) && !$port_in_HTTP_HOST) ? ':' . $HTTP_SERVER_VARS['SERVER_PORT'] : '')
. substr($PHP_SELF, 0, strrpos($PHP_SELF, '/') + 1);
. $HTTP_SERVER_VARS['HTTP_HOST'];
// if $cfg['PmaAbsoluteUri'] is empty and port == 80 or port == 443, do not add ":80" or ":443"
// to the generated URL -> prevents a double password query in case of http authentication.
if (!(!$port_in_HTTP_HOST && !empty($HTTP_SERVER_VARS['SERVER_PORT']) && ($HTTP_SERVER_VARS['SERVER_PORT'] == 80 || $HTTP_SERVER_VARS['SERVER_PORT'] == 443))) {
$cfg['PmaAbsoluteUri'] .= ((!empty($HTTP_SERVER_VARS['SERVER_PORT']) && !$port_in_HTTP_HOST) ? ':' . $HTTP_SERVER_VARS['SERVER_PORT'] : '');
}
$cfg['PmaAbsoluteUri'] .= substr($PHP_SELF, 0, strrpos($PHP_SELF, '/') + 1);
// We display the warning by default, but not if it is disabled thru
// via the $cfg['PmaAbsoluteUri_DisableWarning'] variable.
// This is intended for sysadmins that actually want the default