From: Kevin Israel Date: Mon, 8 Sep 2014 22:15:09 +0000 (-0400) Subject: CurlHttpRequest: Check library version, not CURLOPT_REDIR_PROTOCOLS X-Git-Tag: 1.31.0-rc.0~14108 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/comptes/ajouter.php?a=commitdiff_plain;h=0d707a21ba3dc4f7433c78a51c013f50e627a7a3;p=lhc%2Fweb%2Fwiklou.git CurlHttpRequest: Check library version, not CURLOPT_REDIR_PROTOCOLS This works around . We don't actually use the constant, so checking the library version should suffice. Bug: 70570 Change-Id: I732d8f7eb2908bae10100594f693cf7a63f8b5b1 --- diff --git a/includes/HttpFunctions.php b/includes/HttpFunctions.php index 1eb8ca5294..8302124570 100644 --- a/includes/HttpFunctions.php +++ b/includes/HttpFunctions.php @@ -809,7 +809,8 @@ class CurlHttpRequest extends MWHttpRequest { return false; } - if ( !defined( 'CURLOPT_REDIR_PROTOCOLS' ) ) { + $curlVersionInfo = curl_version(); + if ( $curlVersionInfo['version_number'] < 0x071304 ) { wfDebug( "Cannot follow redirects with libcurl < 7.19.4 due to CVE-2009-0037\n" ); return false; }