[wp-trac] [WordPress Trac] #16606: WP_Http_Streams::test doesn't check enough to confirm if it can do HTTPS
WordPress Trac
wp-trac at lists.automattic.com
Fri Mar 25 05:29:19 UTC 2011
#16606: WP_Http_Streams::test doesn't check enough to confirm if it can do HTTPS
---------------------------------+-----------------------------
Reporter: westi | Owner:
Type: defect (bug) | Status: new
Priority: high | Milestone: Future Release
Component: HTTP | Version: 3.0.5
Severity: major | Resolution:
Keywords: 3.2-early has-patch |
---------------------------------+-----------------------------
Comment (by dd32):
The Streams class only accepts http:// and https:// scheme's:
{{{
if ( 'http' != $arrURL['scheme'] && 'https' !=
$arrURL['scheme'] )
$url = preg_replace('|^' .
preg_quote($arrURL['scheme'], '|') . '|', 'http', $url);
}}}
That renders most of the content of these patches moot.
Suggested:
{{{
function test($args = array()) {
$use = function_exists('fopen');
if ( function_exists('ini_get') && true !=
ini_get('allow_url_fopen') )
$use = false;
if ( !empty($args['ssl']) && !extension_loaded('openssl')
)
$use = false;
return apply_filters('use_streams_transport', $use,
$args);
}
}}}
--
Ticket URL: <http://core.trac.wordpress.org/ticket/16606#comment:4>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list