Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix parsing of JSESSIONID only #10479

Merged
merged 9 commits into from
Sep 18, 2023
Merged

Fix parsing of JSESSIONID only #10479

merged 9 commits into from
Sep 18, 2023

Conversation

gregw
Copy link
Contributor

@gregw gregw commented Sep 5, 2023

Improve the parsing of jsessionid parameters and unify with handling of JSESSIONID.
More tests added.

@gregw gregw marked this pull request as ready for review September 14, 2023 00:48
Copy link
Contributor

@joakime joakime left a comment

Choose a reason for hiding this comment

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

Wish we would use @Deprecated better, especially considering what the javadoc for that annotation says.

Co-authored-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
@gregw gregw requested a review from joakime September 14, 2023 13:12
@gregw
Copy link
Contributor Author

gregw commented Sep 14, 2023

@joakime oops I dismissed your review accidentally after accepting your suggestions!

gregw and others added 2 commits September 15, 2023 13:40
Co-authored-by: Jan Bartel <janb@webtide.com>
if (!session.getId().equals(getSessionIdManager().getId(id)))
{
if (LOG.isDebugEnabled())
LOG.debug("Multiple different valid session ids: {}, {}", requestedSessionId, id);
Copy link
Contributor

Choose a reason for hiding this comment

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

I think you've got all the info to be able to output the source of the ids, isn't it something like:

LOG.debug("Multiple different valid session ids: {} from cookie {}, {} from cookie {}", requestedSessionId, requestedSessionIdFromCookie, id, i < cookieIds);

And similar for the other DEBUG log messages.

@gregw gregw merged commit 4e27d30 into jetty-12.0.x Sep 18, 2023
2 checks passed
@gregw gregw deleted the fix/jetty-12-jsessionid branch September 18, 2023 07:27
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants