HTTP API: Protect against hex interpretation.
Return earlier from wp_http_validate_url(). Props: iandunn, xknown, voldemortensen, whyisjake. git-svn-id: https://develop.svn.wordpress.org/trunk@46475 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
ad6c214307
commit
af8afb943e
@ -550,7 +550,7 @@ function wp_http_validate_url( $url ) {
|
|||||||
} else {
|
} else {
|
||||||
$ip = gethostbyname( $host );
|
$ip = gethostbyname( $host );
|
||||||
if ( $ip === $host ) { // Error condition for gethostbyname()
|
if ( $ip === $host ) { // Error condition for gethostbyname()
|
||||||
$ip = false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ( $ip ) {
|
if ( $ip ) {
|
||||||
|
Loading…
Reference in New Issue
Block a user