mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
Better validation of the URL used in core HTTP requests.
git-svn-id: https://develop.svn.wordpress.org/trunk@24480 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -497,7 +497,7 @@ function download_url( $url, $timeout = 300 ) {
|
||||
if ( ! $tmpfname )
|
||||
return new WP_Error('http_no_file', __('Could not create Temporary file.'));
|
||||
|
||||
$response = wp_remote_get( $url, array( 'timeout' => $timeout, 'stream' => true, 'filename' => $tmpfname ) );
|
||||
$response = wp_remote_get( $url, array( 'timeout' => $timeout, 'stream' => true, 'filename' => $tmpfname, 'reject_unsafe_urls' => true ) );
|
||||
|
||||
if ( is_wp_error( $response ) ) {
|
||||
unlink( $tmpfname );
|
||||
|
||||
Reference in New Issue
Block a user