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

All requests create a session #30321

Open
wezell opened this issue Oct 10, 2024 · 0 comments · May be fixed by #30322
Open

All requests create a session #30321

wezell opened this issue Oct 10, 2024 · 0 comments · May be fixed by #30322
Assignees
Labels

Comments

@wezell
Copy link
Contributor

wezell commented Oct 10, 2024

Regression.

Requests for all assets create a session unnecessarily.

Run this:

curl --head https://demo.dotcms.com/dA/4694d40bd9be/image/320maxh/diving.jpg

And you can see the headers include a JSESSIONID cookie which means a session has been created.

set-cookie: JSESSIONID=745C39F2CACB95B2EC1A01DA4024F0F6; Path=/; Secure; HttpOnly; SameSite=Lax

This regression is caused by the variant code. Bottom line, I don't think we need to create a session if there is no specific variable requested, e.g. variable = "DEFAULT".

You can test this by dropping a breakpoint in the SessionMonitor.sessionCreated method.

Acceptance Criteria

This is a regression and it has happened a few times over dotCMS's lifetime. We need a postman test to make sure we don't create sessions if they are not needed.

Dupe: #7433

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: In Review
Development

Successfully merging a pull request may close this issue.

2 participants