From 5c4031dd8480ff0169024087ff28951dfcc0ea76 Mon Sep 17 00:00:00 2001 From: Aaron Jorbin Date: Tue, 2 Feb 2016 16:24:26 +0000 Subject: [PATCH] Revert [35792] This causes a regression and causes redirects to potentially fail. See #5114 #34028 props ocean90 Built from https://develop.svn.wordpress.org/trunk@36445 git-svn-id: http://core.svn.wordpress.org/trunk@36412 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/pluggable.php | 6 +++--- wp-includes/version.php | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/wp-includes/pluggable.php b/wp-includes/pluggable.php index 3b65e45089..7c38b6d67b 100644 --- a/wp-includes/pluggable.php +++ b/wp-includes/pluggable.php @@ -1349,7 +1349,6 @@ function wp_validate_redirect($location, $default = '') { } $wpp = parse_url(home_url()); - $site = parse_url( site_url() ); /** * Filter the whitelist of hosts to redirect to. @@ -1359,9 +1358,9 @@ function wp_validate_redirect($location, $default = '') { * @param array $hosts An array of allowed hosts. * @param bool|string $host The parsed host; empty if not isset. */ - $allowed_hosts = (array) apply_filters( 'allowed_redirect_hosts', array( $wpp['host'], $site['host'] ), isset( $lp['host'] ) ? $lp['host'] : '' ); + $allowed_hosts = (array) apply_filters( 'allowed_redirect_hosts', array($wpp['host']), isset($lp['host']) ? $lp['host'] : '' ); - if ( isset($lp['host']) && ( ! in_array( $lp['host'], $allowed_hosts ) && ( $lp['host'] != strtolower( $wpp['host'] ) || $lp['host'] != strtolower( $site['host'] ) ) ) ) + if ( isset($lp['host']) && ( !in_array($lp['host'], $allowed_hosts) && $lp['host'] != strtolower($wpp['host'])) ) $location = $default; return $location; @@ -2484,3 +2483,4 @@ function wp_text_diff( $left_string, $right_string, $args = null ) { return $r; } endif; + diff --git a/wp-includes/version.php b/wp-includes/version.php index fb7cdb2c06..347943765a 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.5-alpha-36444'; +$wp_version = '4.5-alpha-36445'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.