diff --git a/wp-includes/http.php b/wp-includes/http.php index 0ad7a5f14b..81f0ea2c24 100644 --- a/wp-includes/http.php +++ b/wp-includes/http.php @@ -469,7 +469,7 @@ function wp_http_validate_url( $url ) { if ( ! $same_host ) { $host = trim( $parsed_url['host'], '.' ); - if ( preg_match( '#^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$#', $host ) ) { + if ( preg_match( '#^(([1-9]?\d|1\d\d|25[0-5]|2[0-4]\d)\.){3}([1-9]?\d|1\d\d|25[0-5]|2[0-4]\d)$#', $host ) ) { $ip = $host; } else { $ip = gethostbyname( $host );