-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: [CURLRequest] skip hostname checks if options 'verify' false #8258
Merged
kenjis
merged 10 commits into
codeigniter4:develop
from
NicolaeIotu:add-curlrequest-curlopt_ssl_verifyhost
Dec 2, 2023
Merged
Changes from 4 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
7e7821b
add: skip hostname checks if CURLRequest options 'verify' is set to f…
NicolaeIotu 3685232
add: SSL verify options when config.verify is string and boolean
NicolaeIotu e159bfd
fix: CURLOPT_SSL_VERIFYPEER values and tests related with CURLOPT_SSL…
NicolaeIotu e601954
recreate fix: CURLOPT_SSL_VERIFYPEER values and tests related with CU…
NicolaeIotu f8dd0b7
Updated Bugs and Breaking sections
NicolaeIotu 25b6d40
Fix sphinx-action warning 'Title underline too short'
NicolaeIotu ab25092
Update user_guide_src/source/changelogs/v4.4.4.rst
NicolaeIotu 6df07b0
Added the summary of the bug
NicolaeIotu bfb9ab4
Revert manual changes to CHANGELOG.md
NicolaeIotu 5b4482c
Added upgrading instructions
NicolaeIotu File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please don't introduce an additional variable, it makes the code less readable - use
$config['verify']
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to clarify. Array element $config['verify'] is accessed 8 times. Isn't this less efficient than using a local variable?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, why would it be?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the element of the array it's not changing value, you get a performance increase if assigning its value to a local variable and using that instead of accessing the array every time especially if the key is not an integer and the value of the element is required many times.
This is pretty much valid for all languages when data type is using hash tables and others alike.
In this case there is a performance increase if using the local variable, but it may be more important to make the code readable.
I forgot to ask. The breaking change is that $config['verify'] cannot take the value 'yes' anymore. This is the only breaking change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this case, I'm pretty sure we would not see the difference. That's why I choose the readability.
Was using the value
yes
was documented somewhere? If not this can be skipped.The breaking change is not using the
ssl_key
array key anymore.