Fix bug #50293 and #81713: file path checking in OpenSSL functions#8667
Merged
bukka merged 1 commit intophp:PHP-8.0from Jun 9, 2022
Merged
Fix bug #50293 and #81713: file path checking in OpenSSL functions#8667bukka merged 1 commit intophp:PHP-8.0from
bukka merged 1 commit intophp:PHP-8.0from
Conversation
nikic
reviewed
May 31, 2022
Member
nikic
left a comment
There was a problem hiding this comment.
It looks like tests for all the elaborate error messages are missing? Like option / array combinations etc.
fc39eef to
682859a
Compare
Member
Author
|
There's still a bit more work (testing) needed as I noticed few mistakes in params when extending the bug81713.phpt . I will need to cover all functions to be sure that there aren't more mistakes. So far I have got cms and pkcs7 covered as well as few others. Will extend it further to cover the rest. |
e400a8f to
6dcf71a
Compare
It introduces a single function to check file paths passed to OpenSSL functions. It expands the path, check null bytes and finally does an open basedir check.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
It introduces a single function to check file paths passed to OpenSSL functions. It expands paths, checks null bytes and finally does an open basedir check.