Skip to content

[2.1] Misc session fixes - #9897

Open
live627 wants to merge 1 commit into
SimpleMachines:release-2.1from
live627:sess
Open

live627 wants to merge 1 commit into
SimpleMachines:release-2.1from
live627:sess

Conversation

@live627

@live627 live627 commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

The two highly visible bugs introduced in 2.1.7 annoyed me to the point that I updated my test suite https://github.com/live627/SMF2.1/tree/unittest

Comment thread Sources/Session.php
if ($sess_data !== null)
{
$this->data = $sess_data;
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

If $sess_data failed to set because of a returned result, we should ensure that $this->data is not retaining a bad result.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

That's nice.

  1. This is what @Oldiesmann had to fix in Make sure we actually have session data before trying to set it #9858
  2. It passes my unit test https://github.com/live627/SMF2.1/blob/unittest/tests/SmfSessionHandlerTest.php
  3. This has the potential to become another highly visible bug.

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.

2 participants