Bail from WP_HTTP when a invalid URL is provided. Fixes #12964

git-svn-id: http://svn.automattic.com/wordpress/trunk@14134 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
dd32 2010-04-18 04:58:19 +00:00
parent 4ba94c72fc
commit efe0a28c18
1 changed files with 3 additions and 0 deletions

View File

@ -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.'));