Skip to content

Remove impossible paths from session_decode and session_encode #13796

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

Merged
merged 1 commit into from
Mar 24, 2024

Conversation

jorgsowa
Copy link
Contributor

@jorgsowa jorgsowa commented Mar 23, 2024

Removed paths from session_decode and session_encode that are impossible to reach, because:

  • session must be active before those functions are called
  • it's impossible to pass an invalid session.serialize_handler. Neither by ini_set or session_start($options).

I have added a test case, but I'm not sure in this case is very relevant.

@jorgsowa jorgsowa requested a review from Girgias as a code owner March 23, 2024 23:44
@jorgsowa jorgsowa changed the title Removed impossible paths from session_decode and session_encode Remove impossible paths from session_decode and session_encode Mar 24, 2024
@devnexen
Copy link
Member

It looks fine but preferably someone more knowledgable with the sessions module would have a look, cc @nielsdos perhaps.

Copy link
Member

@nielsdos nielsdos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this reasoning is right. I also tried breaking it but couldn't find a way to break it.
Thanks for the patch!

@nielsdos nielsdos merged commit f69d540 into php:master Mar 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants