mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-18 12:35:03 +00:00
HTTP: 0.1.2.3
is not a valid IP.
Merges [36435] to the 3.7 branch. Built from https://develop.svn.wordpress.org/branches/3.7@36443 git-svn-id: http://core.svn.wordpress.org/branches/3.7@36410 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
fdcacfe365
commit
44221ce713
@ -481,7 +481,7 @@ function wp_http_validate_url( $url ) {
|
|||||||
}
|
}
|
||||||
if ( $ip ) {
|
if ( $ip ) {
|
||||||
$parts = array_map( 'intval', explode( '.', $ip ) );
|
$parts = array_map( 'intval', explode( '.', $ip ) );
|
||||||
if ( 127 === $parts[0] || 10 === $parts[0]
|
if ( 127 === $parts[0] || 10 === $parts[0] || 0 === $parts[0]
|
||||||
|| ( 172 === $parts[0] && 16 <= $parts[1] && 31 >= $parts[1] )
|
|| ( 172 === $parts[0] && 16 <= $parts[1] && 31 >= $parts[1] )
|
||||||
|| ( 192 === $parts[0] && 168 === $parts[1] )
|
|| ( 192 === $parts[0] && 168 === $parts[1] )
|
||||||
) {
|
) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user