HTTP: Don't treat `localhost` as same host by default.

Merge of [42894] to the 4.6 branch.

Built from https://develop.svn.wordpress.org/branches/4.6@42911


git-svn-id: http://core.svn.wordpress.org/branches/4.6@42741 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Dominik Schilling 2018-04-03 15:37:22 +00:00
parent bf1163226c
commit 5a4e8a9b94
1 changed files with 1 additions and 1 deletions

View File

@ -527,7 +527,7 @@ function wp_http_validate_url( $url ) {
$parsed_home = @parse_url( get_option( 'home' ) );
if ( isset( $parsed_home['host'] ) ) {
$same_host = ( strtolower( $parsed_home['host'] ) === strtolower( $parsed_url['host'] ) || 'localhost' === strtolower( $parsed_url['host'] ) );
$same_host = strtolower( $parsed_home['host'] ) === strtolower( $parsed_url['host'] );
} else {
$same_host = false;
}