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

Path is missing from JSESSIONID cookie in 12 beta 0 #9459

Closed
Artur- opened this issue Mar 1, 2023 · 3 comments
Closed

Path is missing from JSESSIONID cookie in 12 beta 0 #9459

Artur- opened this issue Mar 1, 2023 · 3 comments
Assignees
Labels
Bug For general bugs on Jetty side

Comments

@Artur-
Copy link
Contributor

Artur- commented Mar 1, 2023

Jetty version(s)
12.0.0.beta0 / ee10

Java version/vendor
openjdk version "19.0.1" 2022-10-18

OS type/version
mac os

Description
One of the tests in Vaadin first requests

http://localhost:8888/web-component/themed-component.js

and then later on

http://localhost:8888/

Both of the requests use the session.

Now with Jetty 12 the response to the first request contains

Set-Cookie: JSESSIONID=node01esb8me0d0pxv1ecc7ivw1d4uh1.node0

causing Chrome to store the cookie with the path /web-component

It is thus not passed with the second request to http://localhost:8888/.

Now one of two things can happen, depending on some external circumstances like what is cached and network loading order

  1. The request to / has no cookie, Vaadin expects it to have and an error is printed
  2. The request to / creates a new session and sets a new session id cookie

If a new session cookie is set, then the following request to / includes two session cookies and Jetty directly returns "bad request"

With Jetty 11 and earlier the first request response has

Set-Cookie: JSESSIONID=node0j20fd8h8crx91052t9avzbax11.node0; Path=/

and thus no further session id cookies are set and no more sessions created

@Artur- Artur- added the Bug For general bugs on Jetty side label Mar 1, 2023
@janbartel janbartel self-assigned this Mar 1, 2023
@janbartel
Copy link
Contributor

@Artur- when you ran in jetty-11, did you set the session cookie config at all? Either via context init params or a cookie-config in web.xml?

@Artur-
Copy link
Contributor Author

Artur- commented Mar 8, 2023

I don't think so

@janbartel
Copy link
Contributor

Closed via PR #9477

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For general bugs on Jetty side
Projects
None yet
Development

No branches or pull requests

3 participants