Fixes for r61911:
authorTim Starling <tstarling@users.mediawiki.org>
Wed, 9 Jun 2010 06:39:22 +0000 (06:39 +0000)
committerTim Starling <tstarling@users.mediawiki.org>
Wed, 9 Jun 2010 06:39:22 +0000 (06:39 +0000)
commitb16fd618482261ef5c15b95d4a99e302d7068584
treeeae7352790ee30c72e6bad45635cac4eaee950fc
parent20b857750df34b24f70ce46df75b678fe33080cb
Fixes for r61911:
* Do not follow redirects by default. This breaks on safe_mode, and may potentially open security vulnerabilities in callers which blacklist domain names. Instead, send followRedirects=true option in the HttpTest caller that needs it.
* Added a check for the cURL security vulnerability CVE-2009-0037, which allowed redirects to file:/// and scp://. Refuse to follow redirects if a vulnerable client library is present.
* Factored out the redirect compatibility test into public function canFollowRedirects() so that callers can provide this information to users.
* In PhpHttpRequest, only follow redirects to HTTP URLs, do not fopen() arbitrary locations. This is not quite as bad as it sounds, since the lack of response headers prevents file:/// content from being returned to the caller.
* Fixed vertical alignment in Http::request(), per style guide.
* 304, 305 and 306 responses are not really redirects and cannot contain a Location header.
includes/HttpFunctions.php
maintenance/tests/HttpTest.php