HTTP API: Protect against hex interpretation.
Return earlier from wp_http_validate_url(). Props: iandunn, xknown, voldemortensen, whyisjake. Built from https://develop.svn.wordpress.org/trunk@46475 git-svn-id: http://core.svn.wordpress.org/trunk@46273 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -550,7 +550,7 @@ function wp_http_validate_url( $url ) {
|
||||
} else {
|
||||
$ip = gethostbyname( $host );
|
||||
if ( $ip === $host ) { // Error condition for gethostbyname()
|
||||
$ip = false;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if ( $ip ) {
|
||||
|
||||
Reference in New Issue
Block a user