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

jetty-12.1.x remove unused code from DefaultSessionIdManager for generation of session id #12717

Closed
janbartel opened this issue Jan 15, 2025 · 1 comment
Assignees
Labels
Bug For general bugs on Jetty side

Comments

@janbartel
Copy link
Contributor

The DefaultSessionIdManager uses a workerName to both indicate the identity of the node on which the session is live, and also to prepend to the randomly generated id when creating a new session id.

The workerName is set explicitly via the DefaultSessionIdManager.setWorkerName(String) method, or can also be defaulted to the value of the JETTY_WORKER_INSTANCE environment variable prepended with 'node`.

The code also makes allowance that the workerName can start with a leading $, in which case it is interpreted as the name of a request attribute whose value is the actual worker name (ie identity of the node) . This code seems to have been related to the old mod_jk code, which no longer exists, and it has some undesirable quirks (eg, a workerName with a leading $ will be prepended as-is to the random id instead of the value of the request attribute of that name).

This issue proposes to remove the old code from jetty-12.1 and just use the given or defaulted value of the workerName.

@janbartel janbartel added the Bug For general bugs on Jetty side label Jan 15, 2025
@janbartel janbartel self-assigned this Jan 15, 2025
@sbordet sbordet moved this to 🏗 In progress in Jetty 12.1.0 Jan 15, 2025
@janbartel
Copy link
Contributor Author

Fixed by #12719

@github-project-automation github-project-automation bot moved this from 🏗 In progress to ✅ Done in Jetty 12.1.0 Jan 17, 2025
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
Status: ✅ Done
Development

No branches or pull requests

1 participant