[wp-trac] [WordPress Trac] #11499: curl_setopt() In Feed Options?

WordPress Trac wp-trac at lists.automattic.com
Mon Dec 21 13:03:18 UTC 2009


#11499: curl_setopt() In Feed Options?
----------------------------+-----------------------------------------------
 Reporter:  markmcwilliams  |       Owner:                   
     Type:  defect (bug)    |      Status:  new              
 Priority:  normal          |   Milestone:  2.9.1            
Component:  Feeds           |     Version:  2.9              
 Severity:  normal          |    Keywords:  reporter-feedback
----------------------------+-----------------------------------------------

Comment(by westi):

 Hmm this issue is not directly related to the {{{_MS}}} values it seems.

 It maybe worse than that!

 Looking at the php source code there was a huge drop through case
 statement for curl_setopt which doesn't look like it will work at all.

 An extract of the code from (http://cvs.php.net/viewvc.cgi/php-
 src/ext/curl/interface.c?revision=1.175&view=markup) :
 {{{
 1548    #if LIBCURL_VERSION_NUM >= 0x71304
 1549    case CURLOPT_REDIR_PROTOCOLS:
 1550    case CURLOPT_PROTOCOLS:
 1551    #endif
 1552    #if LIBCURL_VERSION_NUM > 0x070a07 /* CURLOPT_IPRESOLVE is
 available since curl 7.10.8 */
 1553    case CURLOPT_IPRESOLVE:
 1554    #endif
 1555    #if LIBCURL_VERSION_NUM >= 0x070f01
 1556    case CURLOPT_FTP_FILEMETHOD:
 1557    #endif
 1558            convert_to_long_ex(zvalue);
 1559            #if LIBCURL_VERSION_NUM >= 0x71304
 1560            if ((PG(open_basedir) && *PG(open_basedir)) &&
 (Z_LVAL_PP(zvalue) & CURLPROTO_FILE)) {
 1561                    php_error_docref(NULL TSRMLS_CC, E_WARNING,
 "CURLPROTO_FILE cannot be activated when open_basedir is set");
 1562                    RETVAL_FALSE;
 1563                    return 1;
 1564            }
 }}}

 So basically for a boat load of curl options the value set is check by a
 bitmask against {{{CURLPROTO_FILE}}} and if open_basedir is set and the
 bitmask matches then setting of that option won't work.

 PHP.net bug - http://bugs.php.net/bug.php?id=49531

 This issue is fixed for PHP 5.2.12 and PHP 5.3.2.

 Doesn't look like they realised on the ticket how many options is could
 affect.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/11499#comment:8>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list