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/branches/5.2@46480


git-svn-id: http://core.svn.wordpress.org/branches/5.2@46278 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
whyisjake 2019-10-14 15:52:53 +00:00
parent f82ed753cf
commit f0335c6a8b
2 changed files with 2 additions and 2 deletions

View File

@ -555,7 +555,7 @@ function wp_http_validate_url( $url ) {
} else {
$ip = gethostbyname( $host );
if ( $ip === $host ) { // Error condition for gethostbyname()
$ip = false;
return false;
}
}
if ( $ip ) {

View File

@ -13,7 +13,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.2.4-alpha-46479';
$wp_version = '5.2.4-alpha-46480';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.