Index: trunk/phase3/includes/IP.php |
— | — | @@ -114,13 +114,14 @@ |
115 | 115 | * @return string |
116 | 116 | */ |
117 | 117 | public static function sanitizeIP( $ip ) { |
118 | | - if ( !$ip ) return null; |
| 118 | + $ip = trim( $ip ); |
| 119 | + if ( $ip === '' ) return null; |
119 | 120 | // Trim and return IPv4 addresses |
120 | | - if ( self::isIPv4($ip) ) return trim($ip); |
| 121 | + if ( self::isIPv4($ip) ) return $ip; |
121 | 122 | // Only IPv6 addresses can be expanded |
122 | 123 | if ( !self::isIPv6($ip) ) return $ip; |
123 | 124 | // Remove any whitespaces, convert to upper case |
124 | | - $ip = strtoupper( trim($ip) ); |
| 125 | + $ip = strtoupper( $ip ); |
125 | 126 | // Expand zero abbreviations |
126 | 127 | if ( strpos( $ip, '::' ) !== false ) { |
127 | 128 | $ip = str_replace('::', str_repeat(':0', 8 - substr_count($ip, ':')) . ':', $ip); |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -346,7 +346,9 @@ |
347 | 347 | * Toggles in RTL preferences indented to the right, hidden in IE in some |
348 | 348 | cases. |
349 | 349 | * Fix RTL display of the upload form. |
| 350 | +* Fixed regression in blocking of username '0' |
350 | 351 | |
| 352 | + |
351 | 353 | == API changes since 1.10 == |
352 | 354 | |
353 | 355 | Full API documentation is available at http://www.mediawiki.org/wiki/API |