From: Timo Tijhof Date: Tue, 5 Mar 2019 23:55:03 +0000 (+0000) Subject: Remove various references to cURL in code comments X-Git-Tag: 1.34.0-rc.0~2621^2 X-Git-Url: http://git.cyclocoop.org/%22.htmlspecialchars%28%24url_syndic%29.%22?a=commitdiff_plain;h=69d4b694098d139ab6155a35b02fb84645a4f4dd;p=lhc%2Fweb%2Fwiklou.git Remove various references to cURL in code comments Given we now use Guzzle as well, and don't require cURL for any features at a basic level, our code should not be as assumptious about the backend being curl. Such assumptions may be wrong and lead to confusion and/or bugs. Bug: T137926 Change-Id: I6ad7f76768348e1eb8c1fb46c8125cce9285dc22 --- diff --git a/includes/clientpool/SquidPurgeClient.php b/includes/clientpool/SquidPurgeClient.php index 005b326f3e..49d9d1c7f0 100644 --- a/includes/clientpool/SquidPurgeClient.php +++ b/includes/clientpool/SquidPurgeClient.php @@ -25,7 +25,7 @@ * Uses asynchronous I/O, allowing purges to be done in a highly parallel * manner. * - * Could be replaced by curl_multi_exec() or some such. + * @todo Consider using MultiHttpClient. */ class SquidPurgeClient { /** @var string */ diff --git a/includes/http/Http.php b/includes/http/Http.php index c29f1999e2..f0972dcf24 100644 --- a/includes/http/Http.php +++ b/includes/http/Http.php @@ -132,11 +132,14 @@ class Http { } /** - * Checks that the given URI is a valid one. Hardcoding the - * protocols, because we only want protocols that both cURL - * and php support. + * Check that the given URI is a valid one. * - * file:// should not be allowed here for security purpose (r67684) + * This hardcodes a small set of protocols only, because we want to + * deterministically reject protocols not supported by all HTTP-transport + * methods. + * + * "file://" specifically must not be allowed, for security purpose + * (see ). * * @todo FIXME this is wildly inaccurate and fails to actually check most stuff * diff --git a/includes/specials/SpecialUploadStash.php b/includes/specials/SpecialUploadStash.php index abd3e07815..4d0c20c76a 100644 --- a/includes/specials/SpecialUploadStash.php +++ b/includes/specials/SpecialUploadStash.php @@ -261,7 +261,8 @@ class SpecialUploadStash extends UnlistedSpecialPage { $scalerThumbUrl = $scalerBaseUrl . '/' . $file->getUrlRel() . '/' . rawurlencode( $scalerThumbName ); - // make a curl call to the scaler to create a thumbnail + // make an http request based on wgUploadStashScalerBaseUrl to lazy-create + // a thumbnail $httpOptions = [ 'method' => 'GET', 'timeout' => 5 // T90599 attempt to time out cleanly