Skip to content
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

[Bug] 73529 Add a failing test #2221

Merged
merged 1 commit into from Nov 27, 2016
Merged

[Bug] 73529 Add a failing test #2221

merged 1 commit into from Nov 27, 2016

Conversation

@duncan3dc
Copy link
Contributor

duncan3dc commented Nov 24, 2016

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?

@php-pulls

This comment has been minimized.

Copy link

php-pulls commented Nov 26, 2016

Comment on behalf of krakjoe at php.net:

labelling

@php-pulls php-pulls added the Tests label Nov 26, 2016
@yohgaki

This comment has been minimized.

Copy link
Contributor

yohgaki commented Nov 27, 2016

@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.

@php-pulls php-pulls merged commit 2d81675 into php:master Nov 27, 2016
1 check failed
1 check failed
continuous-integration/travis-ci/pr The Travis CI build failed
Details
@cmb69

This comment has been minimized.

Copy link
Contributor

cmb69 commented Aug 3, 2018

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
4 participants
You can’t perform that action at this time.