-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Fix Cookie Prefix #6024
Fix Cookie Prefix #6024
Conversation
# Conflicts: # system/Helpers/cookie_helper.php
-There was a naming convention issue which could happen sometimes where adding a prefix would create 2 cookies for the session a properly prefixed session cookie and a un-prefixed session cookie
Thank you for sending a PR.
I don't know this issue. Could you make it another PR? |
This is my simple question.
It is clearly stated that we need unit tests. |
I understand why! 🥇 |
Well if it’s not supposed to set the prefix on the session cookie then it’s broken occasionally in the opposite way. |
@colethorsen I don't know why the session is broken occasionally, and why this PR fixes it. Anyway, the session cookie name is another issue. |
#6082 was merged. |
Fixes #6009
This allows the cookie_helper to enforce the default prefix if one exists, and also allows the user to set their own prefix including none at all to overwrite the prefix if necessary. This way there is no longer a collision issue if there are cookies that are prefixed and un-prefixed.
There is also an issue with the session setup where it would inconsistently set the name of the session cookie with and without the cookie prefix leading to multiple session cookies and also effectively creating the same prefixed vs un-prefixed issue.
Checklist: