jenkins-bot has submitted this change and it was merged.
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(-)
Approvals:
Anomie: Looks good to me, approved
jenkins-bot: Verified
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: merged
Gerrit-Change-Id: Ia4e1689249b6ac515b859ea2eca1dcff3e63098c
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: REL1_19
Gerrit-Owner: CSteipp <[email protected]>
Gerrit-Reviewer: Anomie <[email protected]>
Gerrit-Reviewer: Krinkle <[email protected]>
Gerrit-Reviewer: Tim Starling <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits