CSteipp has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/51788


Change subject: Preserve caller expectations for behaviour of sslVerifyHost
......................................................................

Preserve caller expectations for behaviour of sslVerifyHost

(bug 42441) The previous patch unnecessarily broke backwards
compatibility in the Http::request() API, following cURL's broken
conventions for sslVerifyHost instead of the boolean interpretation
expected by all existing callers. This change reverts that one, and
fixes the bug in another way. See Ia6535f10.

Also don't bother wrapping the $this->sslVerifyHost access with isset()
since it's always set.

Change-Id: Ia4e1689249b6ac515b859ea2eca1dcff3e63098c
---
M includes/HttpFunctions.php
1 file changed, 2 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/88/51788/1

diff --git a/includes/HttpFunctions.php b/includes/HttpFunctions.php
index 147823f..cb1c221 100644
--- a/includes/HttpFunctions.php
+++ b/includes/HttpFunctions.php
@@ -690,13 +690,8 @@
                }
                $this->curlOptions[CURLOPT_USERAGENT] = 
$this->reqHeaders['User-Agent'];
 
-               if ( isset( $this->sslVerifyHost ) ) {
-                       $this->curlOptions[CURLOPT_SSL_VERIFYHOST] = 
$this->sslVerifyHost;
-               }
-
-               if ( isset( $this->sslVerifyCert ) ) {
-                       $this->curlOptions[CURLOPT_SSL_VERIFYPEER] = 
$this->sslVerifyCert;
-               }
+               $this->curlOptions[CURLOPT_SSL_VERIFYHOST] = 
$this->sslVerifyHost ? 2 : 0;
+               $this->curlOptions[CURLOPT_SSL_VERIFYPEER] = 
$this->sslVerifyCert;
 
                if ( $this->caInfo ) {
                        $this->curlOptions[CURLOPT_CAINFO] = $this->caInfo;

-- 
To view, visit https://gerrit.wikimedia.org/r/51788
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia4e1689249b6ac515b859ea2eca1dcff3e63098c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: REL1_19
Gerrit-Owner: CSteipp <cste...@wikimedia.org>
Gerrit-Reviewer: Tim Starling <tstarl...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to