r97772 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r97771‎ | r97772 | r97773 >
Date:00:11, 22 September 2011
Author:brion
Status:ok
Tags:
Comment:
* (bug 30041) Fix memcached validation in installer to accept resolvable hostnames

'localhost:11211' was rejected because 'localhost' isn't an IP address... however it's a perfectly legit host to connect to. :)

Followup to r82687 which introduced the IP address check.
Modified paths:
  • /trunk/phase3/includes/installer/WebInstallerPage.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/installer/WebInstallerPage.php
@@ -1081,8 +1081,10 @@
10821082 }
10831083
10841084 foreach( $memcServers as $server ) {
1085 - $memcParts = explode( ":", $server );
1086 - if( !IP::isValid( $memcParts[0] ) ) {
 1085+ $memcParts = explode( ":", $server, 2 );
 1086+ if ( !isset( $memcParts[0] )
 1087+ || ( !IP::isValid( $memcParts[0] )
 1088+ && ( gethostbyname( $memcParts[0] ) == $memcParts[0] ) ) ) {
10871089 $this->parent->showError( 'config-memcache-badip', $memcParts[0] );
10881090 return false;
10891091 } elseif( !isset( $memcParts[1] ) ) {

Follow-up revisions

RevisionCommit summaryAuthorDate
r97774* (bug 30041) Fix installer cache selection field to keep the selected radio ...brion00:35, 22 September 2011
r98754MFT r93431, r94761, r97762, r97772, r97774, r97777, r97817reedy13:10, 3 October 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r82687(bug 25855) Installer does not validate Memcached server settingsdemon17:54, 23 February 2011

Status & tagging log