diff --git a/wp-includes/functions.php b/wp-includes/functions.php index be0113254e..6dbc510af5 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -1525,8 +1525,10 @@ function wp_get_referer() { elseif ( ! empty( $_SERVER['HTTP_REFERER'] ) ) $ref = wp_unslash( $_SERVER['HTTP_REFERER'] ); - if ( $ref && $ref !== wp_unslash( $_SERVER['REQUEST_URI'] ) ) + if ( $ref && $ref !== wp_unslash( $_SERVER['REQUEST_URI'] ) && $ref !== home_url() . wp_unslash( $_SERVER['REQUEST_URI'] ) ) { return wp_validate_redirect( $ref, false ); + } + return false; } diff --git a/wp-includes/version.php b/wp-includes/version.php index b7ba280568..90799aa3b7 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.5-alpha-36241'; +$wp_version = '4.5-alpha-36242'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.