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:
parent
4ba94c72fc
commit
efe0a28c18
|
@ -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.'));
|
||||
|
||||
|
|
Loading…
Reference in New Issue