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
This commit is contained in:
parent
8771fc4af7
commit
b15624a124
@ -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
Block a user