From 0e18d28947d7973b544600e7b82ebb20e1c78f8f Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Sun, 23 Jun 2013 06:02:19 +0000 Subject: [PATCH] Broader fix for [24497] for setup-config.php in trunk. props SergeyBiryukov, markoheijnen. fixes #24627. git-svn-id: https://develop.svn.wordpress.org/trunk@24503 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/class-http.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/wp-includes/class-http.php b/wp-includes/class-http.php index 50e18f99d6..0a277b6eb8 100644 --- a/wp-includes/class-http.php +++ b/wp-includes/class-http.php @@ -119,10 +119,11 @@ class WP_Http { if ( false !== $pre ) return $pre; - if ( $r['reject_unsafe_urls'] ) - $url = wp_http_validate_url( $url ); - if ( function_exists( 'wp_kses_bad_protocol' ) ) + if ( function_exists( 'wp_kses_bad_protocol' ) ) { + if ( $r['reject_unsafe_urls'] ) + $url = wp_http_validate_url( $url ); $url = wp_kses_bad_protocol( $url, array( 'http', 'https', 'ssl' ) ); + } $arrURL = @parse_url( $url );