(bug 14977) Installations on servers using IPv6 addresses for $wgServer were largely...
authorChad Horohoe <demon@users.mediawiki.org>
Wed, 30 Jul 2008 03:23:38 +0000 (03:23 +0000)
committerChad Horohoe <demon@users.mediawiki.org>
Wed, 30 Jul 2008 03:23:38 +0000 (03:23 +0000)
RELEASE-NOTES
includes/DefaultSettings.php

index 98af298..e1280f4 100644 (file)
@@ -43,6 +43,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * (bug 14954) Fix regression in Modern and Simple skins
 * Recursion loop check added to Categoryfinder class
 * Fixed few performance troubles of large job queue processing
+* (bug 14977) Installations on servers using IPv6 addresses for $wgServer
+  were largely unusable because $wgServer didn't wrap the IP in brackets.
 
 === API changes in 1.14 ===
 
index 2cc0672..e50f662 100644 (file)
@@ -69,6 +69,12 @@ if( isset( $_SERVER['SERVER_NAME'] ) ) {
        $wgServerName = 'localhost';
 }
 
+# Before we put http:// and other things onto it, need to 
+# wrap IPv6 in []. Bug 14977.
+if ( IP::isIPv6( $wgServerName ) ) {
+       $wgServerName = '[' . $wgServerName . ']';
+}
+
 # check if server use https:
 $wgProto = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') ? 'https' : 'http';