Merged
Conversation
|
Comment on behalf of krakjoe at php.net: labelling |
Contributor
|
@duncan3dc Thank you. I'll look into this. BTW "php" serializer uses special serialization format because of "register_globals" legacy. If you would like to use plain "serialize()", you need "php_serialize" as session serializer. Regardless of this, failed decode should be handled properly. |
Member
|
@duncan3dc I think you're spot on! If the delimiter is not found, we can set failure there, because for an empty session the outer while loop would not be executed. The only issue I could see is for manually constructed session strings, which may have trailing whitespace (or even other characters), so we may have a BC break here. Might be best to apply a respective fix for master or PHP-7.3 only. |
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.
I wrote the included test for Bug 73529, and I attempted to fix it but couldn't quite figure it out.
I think the problem is around this part of the code. It reads like if it doesn't find the delimiter (separating the name from the value, eg
test|i:1;) then it just returns true. But we can't set a failure here, as an empty session would also fail.Any suggestions @yohgaki, or am I way off?