From 5d6af24268b4d91485c62e3e07503b6a858e2850 Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Sun, 31 May 2009 12:50:52 +0000 Subject: [PATCH] bug #2799009 Login with ipv6 IP address breaks redirect --- ChangeLog | 3 +++ libraries/Config.class.php | 7 ++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2b4fb98f5..bf708544c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -10,6 +10,9 @@ $HeadURL: https://phpmyadmin.svn.sourceforge.net/svnroot/phpmyadmin/trunk/phpMyA thanks to Michael Valushko - dylfin - bug #2794840 [core] Cannot redeclare pma_tableheader() +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) + rfe #2127987 warn when session.gc_maxlifetime is less than cookie validity diff --git a/libraries/Config.class.php b/libraries/Config.class.php index a3dc64cd2..6934a2c8e 100644 --- a/libraries/Config.class.php +++ b/libraries/Config.class.php @@ -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'); }