mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-01 15:50:09 +00:00
Use wp_safe_remote_request() and friends instead of reject_unsafe_urls = true.
fixes #24646. git-svn-id: https://develop.svn.wordpress.org/trunk@24917 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -69,7 +69,6 @@ class WP_SimplePie_File extends SimplePie_File {
|
||||
$args = array(
|
||||
'timeout' => $this->timeout,
|
||||
'redirection' => $this->redirects,
|
||||
'reject_unsafe_urls' => true,
|
||||
);
|
||||
|
||||
if ( !empty($this->headers) )
|
||||
@@ -78,7 +77,7 @@ class WP_SimplePie_File extends SimplePie_File {
|
||||
if ( SIMPLEPIE_USERAGENT != $this->useragent ) //Use default WP user agent unless custom has been specified
|
||||
$args['user-agent'] = $this->useragent;
|
||||
|
||||
$res = wp_remote_request($url, $args);
|
||||
$res = wp_safe_remote_request($url, $args);
|
||||
|
||||
if ( is_wp_error($res) ) {
|
||||
$this->error = 'WP HTTP Error: ' . $res->get_error_message();
|
||||
|
||||
Reference in New Issue
Block a user