Make WordPress Core

Ticket #7458: fix_curl.patch

File fix_curl.patch, 739 bytes (added by Po0ky, 18 years ago)

check_safe_curl.patch

  • wordpress/wp-includes/http.php

     
    840840                curl_setopt( $handle, CURLOPT_USERAGENT, $r['user-agent'] );
    841841                curl_setopt( $handle, CURLOPT_CONNECTTIMEOUT, 1 );
    842842                curl_setopt( $handle, CURLOPT_TIMEOUT, $r['timeout'] );
    843                 curl_setopt( $handle, CURLOPT_FOLLOWLOCATION, true );
    844843                curl_setopt( $handle, CURLOPT_MAXREDIRS, $r['redirection'] );
    845844
     845                if ( !ini_get('safe_mode') && !ini_get('open_basedir') )
     846                  curl_setopt( $handle, CURLOPT_FOLLOWLOCATION, true );
     847
    846848                if( ! is_null($headers) )
    847849                        curl_setopt( $handle, CURLOPT_HTTPHEADER, $headers );
    848850