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

[2.1] Remove PHPSESSID #8394

Open
wants to merge 2 commits into
base: release-2.1
Choose a base branch
from

Conversation

sbulen
Copy link
Contributor

@sbulen sbulen commented Jan 3, 2025

Fixes #8393

Partial for #8383 (addresses 2.1 only)

This PR removes PHPSESSID URL handling altogether from SMF. It also addresses the 8.4 SID & session parameter deprecation issues, that are related. The point of the 8.4 changes was to eventually remove PHP's PHPSESSID URL processing.

It goes a bit further and will not write sessions where cookies are not present/allowed. I believe this last part can significantly decrease MySQL CPU workload for websites that are getting crawled heavily (like mine).

Testing thus far is fine. Things work OK with & without cookies. No impact to logon/logoff. No impact to queryless URLs. And there are DEFINITELY far fewer session records, that I believe were all unused anyway.

I have a modlet with this code that I have installed in various test environments & tested. It's on my prod site as well.

Loss of functionality:
Removing PHPSESSID from the URL did break one piece of functionality: Guest captcha verification, for searches & posts, specifically for people with cookies blocked. The image is not displayed. It works fine if cookies are not blocked.

I'm tempted to just leave it alone; I suspect folks who disable cookies run into lots of such limitations.

If we want something cleaner, another option would be to not display the search & post (& login) buttons when cookies are not found. Or an error popup, saying cookies are required. Open to feedback.

@sbulen sbulen changed the title 21 remove phpsessid [2.1] Remove PHPSESSID Jan 4, 2025
@sbulen
Copy link
Contributor Author

sbulen commented Jan 4, 2025

The PHP check error, I think, is due to the fact that in some of the 2.1 source code the year is still 2024...

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