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

Add warning for change session id when session is active #2406

Closed
wants to merge 2 commits into from

Conversation

4 participants
@dreamsxin
Copy link
Contributor

commented Mar 7, 2017

No description provided.

@nikic

This comment has been minimized.

Copy link
Member

commented Mar 7, 2017

There are test failures on Travis.

/cc @yohgaki

@nikic nikic added the Enhancement label Mar 7, 2017

@yohgaki

This comment has been minimized.

Copy link
Contributor

commented Mar 8, 2017

The change is good. I'll look into why travis fails.

@yohgaki

This comment has been minimized.

Copy link
Contributor

commented Mar 8, 2017

@dreamsxin
You set invalid char for session ID in ext/session/tests/session_id_error3.phpt. Is the test passed on your system?

@dreamsxin

This comment has been minimized.

Copy link
Contributor Author

commented Mar 8, 2017

@yohgaki
I will fix, In the editor copy invalid char auto change.

@yohgaki

This comment has been minimized.

Copy link
Contributor

commented Mar 8, 2017

@dreamsxin
I haven't look into the related code close enough, but IIRC, invalid chars handling is up to save handlers except few chars. All you may have to do is to set appropriate save handler for the test. I guess you are using 3rd party save handler such as memcached.

Invalid chars in session ID is perfectly OK in tests, so you may keep using invalid session ID if you would like. I suggest to use escape sequence in this case.

@dreamsxin

This comment has been minimized.

Copy link
Contributor Author

commented Mar 8, 2017

@yohgaki Help see why fails.

@yohgaki

This comment has been minimized.

Copy link
Contributor

commented Mar 8, 2017

@dreamsxin You don't have to discard invalid chars. Set save handler to "files", and adjust expected test script outputs. Since some developers may have problem with invalid chars, it's better to use escape sequence for invalid chars(bytes). e.g. "\x01"

@dreamsxin

This comment has been minimized.

Copy link
Contributor Author

commented Mar 8, 2017

@yohgaki Use hex string? I will replace. But now for the failure now has nothing to do with that.

@dreamsxin

This comment has been minimized.

Copy link
Contributor Author

commented Mar 8, 2017

Already used 16 decimal values instead.

@yohgaki

This comment has been minimized.

Copy link
Contributor

commented Mar 9, 2017

@dreamsxin
It seems test is fixed.
I'm not quite sure how you fixed error, but I guess your test was failed because session.c removes some offending chars for session ID embedding in web pages. I'll check your patch fully and merge later. Thank you for your pull request!

@krakjoe

This comment has been minimized.

Copy link
Member

commented Jul 25, 2017

@yohgaki what is the status of this patch ?

@yohgaki

This comment has been minimized.

Copy link
Contributor

commented Jul 25, 2017

@krakjoe
The diff is good to merge. It should prevent changing id, but return current id when name is null. Please merge this.

@krakjoe

This comment has been minimized.

Copy link
Member

commented Jul 25, 2017

Merged 072ef62

Thanks.

@krakjoe krakjoe closed this Jul 25, 2017

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