Skip to content

Commit f8dd0b7

Browse files
committed
Updated Bugs and Breaking sections
Revert to ['verify'] instead of
1 parent e601954 commit f8dd0b7

File tree

3 files changed

+19
-8
lines changed

3 files changed

+19
-8
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# Changelog
22

3+
## [v4.4.4](https://github.com/codeigniter4/CodeIgniter4/tree/v4.4.4) (Unreleased)
4+
[Full Changelog](https://github.com/codeigniter4/CodeIgniter4/compare/v4.4.3...v4.4.4)
5+
6+
### Fixed Bugs
7+
8+
* fix: [CURLRequest] skip hostname checks if options 'verify' false by @NicolaeIotu in https://github.com/codeigniter4/CodeIgniter4/pull/8258
9+
310
## [v4.4.3](https://github.com/codeigniter4/CodeIgniter4/tree/v4.4.3) (2023-10-26)
411
[Full Changelog](https://github.com/codeigniter4/CodeIgniter4/compare/v4.4.2...v4.4.3)
512

system/HTTP/CURLRequest.php

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -548,21 +548,19 @@ protected function setCURLOptions(array $curlOptions = [], array $config = [])
548548

549549
// SSL Verification
550550
if (isset($config['verify'])) {
551-
$configVerify = $config['verify'];
552-
553-
if (is_string($configVerify)) {
554-
$file = realpath($configVerify) ?: $configVerify;
551+
if (is_string($config['verify'])) {
552+
$file = realpath($config['verify']) ?: $config['verify'];
555553

556554
if (! is_file($file)) {
557-
throw HTTPException::forInvalidSSLKey($configVerify);
555+
throw HTTPException::forInvalidSSLKey($config['verify']);
558556
}
559557

560558
$curlOptions[CURLOPT_CAINFO] = $file;
561559
$curlOptions[CURLOPT_SSL_VERIFYPEER] = true;
562560
$curlOptions[CURLOPT_SSL_VERIFYHOST] = 2;
563-
} elseif (is_bool($configVerify)) {
564-
$curlOptions[CURLOPT_SSL_VERIFYPEER] = $configVerify;
565-
$curlOptions[CURLOPT_SSL_VERIFYHOST] = $configVerify ? 2 : 0;
561+
} elseif (is_bool($config['verify'])) {
562+
$curlOptions[CURLOPT_SSL_VERIFYPEER] = $config['verify'];
563+
$curlOptions[CURLOPT_SSL_VERIFYHOST] = $config['verify'] ? 2 : 0;
566564
}
567565
}
568566

user_guide_src/source/changelogs/v4.4.4.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,12 @@ Validation rules matches and differs
2727
Bugs have been fixed in the case where ``matches`` and ``differs`` in the Strict
2828
and Traditional rules validate data of non-string types.
2929

30+
CURLRequest option 'ssl_key' eliminated
31+
====================================
32+
33+
CURLRequest option 'ssl_key' was eliminated.
34+
Please use CURLRequest option 'verify' to indicate the path to a CA bundle.
35+
3036
***************
3137
Message Changes
3238
***************

0 commit comments

Comments
 (0)