Make WordPress Core

Ticket #7458: 7458.diff

File 7458.diff, 710 bytes (added by ionfish, 18 years ago)
  • 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