From b15624a124cccca1dc58b060dc318bb3f08b448a Mon Sep 17 00:00:00 2001 From: Dion Hulse Date: Sun, 18 Apr 2010 04:58:19 +0000 Subject: [PATCH] Bail from WP_HTTP when a invalid URL is provided. Fixes #12964 git-svn-id: https://develop.svn.wordpress.org/trunk@14134 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/class-http.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/wp-includes/class-http.php b/wp-includes/class-http.php index ee08e424c3..b5075cc320 100644 --- a/wp-includes/class-http.php +++ b/wp-includes/class-http.php @@ -240,6 +240,9 @@ class WP_Http { $arrURL = parse_url($url); + if ( empty( $url ) || empty($url['scheme'] ) ) + return new WP_Error('http_request_failed', __('A valid URL was not provided.')); + if ( $this->block_request( $url ) ) return new WP_Error('http_request_failed', __('User has blocked requests through HTTP.'));