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 NPE from WebSocketSession.getUserPrincipal() in Jetty10 #5852

Merged
merged 6 commits into from
Jan 13, 2021

Conversation

lachlan-roberts
Copy link
Contributor

Closes #5850

The UpgradeRequest was not set on the JavaxFrameHandler for server side upgrades. This causes a NPE when WebSocketSession.getUserPrincipal() is called.

Also change the Upgrade header sent by the server to use lower case websocket, which is the correct usage from RFC6455.

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
@lachlan-roberts lachlan-roberts requested a review from gregw January 8, 2021 08:17
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
Copy link
Contributor

@gregw gregw left a comment

Choose a reason for hiding this comment

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

LGTM

@lachlan-roberts lachlan-roberts merged commit 16acdcf into jetty-10.0.x Jan 13, 2021
@joakime joakime deleted the jetty-10.0.x-5850-UpgradeRequestNPE branch February 1, 2021 19:15
# 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.

NPE at WebSocketSession.java, public Principal getUserPrincipal() method
2 participants