Make WordPress Core


Ignore:
Timestamp:
07/31/2013 06:53:06 AM (13 years ago)
Author:
nacin
Message:

Use wp_safe_remote_request() and friends instead of reject_unsafe_urls = true.

Merges [24917] to the 3.6 branch.
fixes #24646.

Location:
branches/3.6
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/3.6

  • branches/3.6/wp-includes/class-oembed.php

    r24903 r24918  
    114114
    115115                // Fetch URL content
    116                 if ( $html = wp_remote_retrieve_body( wp_remote_get( $url, array( 'reject_unsafe_urls' => true ) ) ) ) {
     116                if ( $html = wp_remote_retrieve_body( wp_safe_remote_get( $url ) ) ) {
    117117
    118118                        // <link> types that contain oEmbed provider URLs
     
    196196        function _fetch_with_format( $provider_url_with_args, $format ) {
    197197                $provider_url_with_args = add_query_arg( 'format', $format, $provider_url_with_args );
    198                 $response = wp_remote_get( $provider_url_with_args, array( 'reject_unsafe_urls' => true ) );
     198                $response = wp_safe_remote_get( $provider_url_with_args );
    199199                if ( 501 == wp_remote_retrieve_response_code( $response ) )
    200200                        return new WP_Error( 'not-implemented' );
Note: See TracChangeset for help on using the changeset viewer.