bug #2799009 Login with ipv6 IP address breaks redirect

This commit is contained in:
Herman van Rink
2009-05-31 12:50:52 +00:00
parent f1501e6544
commit 06bb14ff47
2 changed files with 5 additions and 3 deletions

View File

@@ -6,6 +6,7 @@ $Id$
$HeadURL: https://phpmyadmin.svn.sourceforge.net/svnroot/phpmyadmin/trunk/phpMyAdmin/ChangeLog $
3.2.1.0 (not yet released)
- bug #2799009 Login with ipv6 IP address breaks redirect
3.2.0.0 (not yet released)
- [core] better support for vendor customisation (based on what Debian needs)

View File

@@ -603,9 +603,10 @@ class PMA_Config
// Host and port
if (PMA_getenv('HTTP_HOST')) {
if (strpos(PMA_getenv('HTTP_HOST'), ':') !== false) {
list($url['host'], $url['port']) =
explode(':', PMA_getenv('HTTP_HOST'));
// Prepend the scheme before using parse_url() since this is not part of the RFC2616 Host request-header
$parsed_url = parse_url($url['scheme'] . '://' . PMA_getenv('HTTP_HOST'));
if (!empty($parsed_url['host'])) {
$url = $parsed_url;
} else {
$url['host'] = PMA_getenv('HTTP_HOST');
}