Skip to content

Conversation

@jefft
Copy link
Contributor

@jefft jefft commented Oct 28, 2025

Jethro has this odd behaviour where it sets the JethroSess cookie, then immediately deletes it and re-issues it in upgrade_session_cookie. The latter appears to be a later addition, to add SameSite=Lax to previously issued cookies.

This PR removes upgrade_session_cookie and sets JethroSess just once. In PHP 7.3+ (ref. #1310) we can set SameSite directly in session_set_cookie_params(), and it's even the default in PHP 8.x.

It is also unnecessary to call session_set_cookie_params() before session_regenerate_id(true), as the new cookie already inherits the set cookie params, including SameSite.

longer supported.  In PHP 7.3+ we can set SameSite directly in
session_set_cookie_params(), and it's even the default in PHP 8.x.

It is also unnecessary to call session_set_cookie_params() before
session_regenerate_id(true), as the new cookie already inherits the set
cookie params, including SameSite.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant