Index: trunk/phase3/tests/phpunit/includes/IPTest.php |
— | — | @@ -272,10 +272,14 @@ |
273 | 273 | * @covers IP::isPublic |
274 | 274 | */ |
275 | 275 | public function testPrivateIPs() { |
276 | | - $private = array( 'fc::3', 'fc::ff', '::1', '10.0.0.1', '172.16.0.1', '192.168.0.1' ); |
| 276 | + $private = array( 'fc00::3', 'fc00::ff', '::1', '10.0.0.1', '172.16.0.1', '192.168.0.1' ); |
277 | 277 | foreach ( $private as $p ) { |
278 | 278 | $this->assertFalse( IP::isPublic( $p ), "$p is not a public IP address" ); |
279 | 279 | } |
| 280 | + $public = array( '2001:5c0:1000:a::133', 'fc::3' ); |
| 281 | + foreach ( $public as $p ) { |
| 282 | + $this->assertTrue( IP::isPublic( $p ), "$p is a public IP address" ); |
| 283 | + } |
280 | 284 | } |
281 | 285 | |
282 | 286 | // Private wrapper used to test CIDR Parsing. |
Index: trunk/phase3/includes/IP.php |
— | — | @@ -378,7 +378,7 @@ |
379 | 379 | static $privateRanges = false; |
380 | 380 | if ( !$privateRanges ) { |
381 | 381 | $privateRanges = array( |
382 | | - array( 'fc::', 'fdff:ffff:ffff:ffff:ffff:ffff:ffff:ffff' ), # RFC 4193 (local) |
| 382 | + array( 'fc00::', 'fdff:ffff:ffff:ffff:ffff:ffff:ffff:ffff' ), # RFC 4193 (local) |
383 | 383 | array( '0:0:0:0:0:0:0:1', '0:0:0:0:0:0:0:1' ), # loopback |
384 | 384 | ); |
385 | 385 | } |