diff options
author | Yaco <franco@reevo.org> | 2019-10-04 16:03:20 -0300 |
---|---|---|
committer | Yaco <franco@reevo.org> | 2019-10-04 16:03:20 -0300 |
commit | ac6bedd68a70d744a927494351100e6bfabfe14e (patch) | |
tree | 7a9a7967a6244008edbc27055b205d936cb45b02 /www/crm/wp-includes/pluggable.php | |
parent | b25b94b8b0aacab5a5a38bb107201c7f92c083ab (diff) |
Actualiza WP a 5.2.3
Diffstat (limited to 'www/crm/wp-includes/pluggable.php')
-rw-r--r-- | www/crm/wp-includes/pluggable.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/www/crm/wp-includes/pluggable.php b/www/crm/wp-includes/pluggable.php index 777dfbef..2f302539 100644 --- a/www/crm/wp-includes/pluggable.php +++ b/www/crm/wp-includes/pluggable.php @@ -1396,6 +1396,14 @@ if ( ! function_exists( 'wp_validate_redirect' ) ) : return $default; } + if ( ! isset( $lp['host'] ) && ! empty( $lp['path'] ) && '/' !== $lp['path'][0] ) { + $path = ''; + if ( ! empty( $_SERVER['REQUEST_URI'] ) ) { + $path = dirname( parse_url( 'http://placeholder' . $_SERVER['REQUEST_URI'], PHP_URL_PATH ) . '?' ); + } + $location = '/' . ltrim( $path . '/', '/' ) . $location; + } + // Reject if certain components are set but host is not. This catches urls like https:host.com for which parse_url does not set the host field. if ( ! isset( $lp['host'] ) && ( isset( $lp['scheme'] ) || isset( $lp['user'] ) || isset( $lp['pass'] ) || isset( $lp['port'] ) ) ) { return $default; |