Merged
Conversation
Revert InitialLoginSessionHandler to the same state as after dc18437
# Conflicts: # proxy/src/main/java/com/velocitypowered/proxy/connection/client/InitialLoginSessionHandler.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR reverts any GameProfile caching and reverts the state of
InitialLoginSessionHandlerto dc18437.Before this PR, we already were not caching gameprofiles after 22393b8. This PR just cleans the implementation up to be more aligned with upstream, and it also re-implements a simpler version of the shared HttpClient feature of the previous GameProfile fetching implementation. This way, we can make use of connection pooling, allowing HTTP connections to stay open (for up to 30 seconds by default) for faster subsequent requests.
Caching of
GameProfileobjects here is inherently flawed here, as we fetchhttps://sessionserver.mojang.com/session/minecraft/hasJoined, an endpoint which doesn't only return the "official"/properGameProfilebut also performs checks on theserverIdwe pass, which is cryptographically generated based on the shared secret with the client and the server's public key. We need to perform this check on every online player that tries to join the server to ensure they have a proper online mode account.Also cherry-picks PaperMC@742bd72 from PaperMC#1754 (Setup encryption before possible disconnect) as we had this behavior implemented here before too.