Skip to content

session: close save handler before re-initializing an active session - #23597

Open
iliaal wants to merge 1 commit into
php:PHP-8.4from
iliaal:promote/session-reset-close
Open

session: close save handler before re-initializing an active session#23597
iliaal wants to merge 1 commit into
php:PHP-8.4from
iliaal:promote/session-reset-close

Conversation

@iliaal

@iliaal iliaal commented Sep 6, 2026

Copy link
Copy Markdown
Member

php_session_initialize() set the status to active and called the save handler's open() and read() without first closing a session that was already active, so session_reset() on an open session issued a second open() with no intervening close(). Aborting the active session first pairs every open() with a close().

The test asserts the handler's own call log, which is open, read, open, read before the change and open, read, close, open, read after.

php_session_initialize() set the status to active and called the save
handler's open() and read() without first closing a session that was
already active, so session_reset() left the earlier open() unmatched.
Abort the active session first, pairing every open() with a close().

Closes phpGH-23597
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.

1 participant