Repository navigation
Conversation
An existing premium user was matched by username only. After a username was released and reclaimed by another premium account, the new owner logged into the previous user's identity and inherited its permissions. Compare the stored mojangUuid with the Mojang-verified profile and deny the login on mismatch.
This branch has not been deployed
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.
Problem
On login of an existing premium user, NavAuth matches the account by username only. In
UsernameResolutionServicethe branch for an existing premium user (existingUserIgnoreCase != null && isPremium) never compares the storedmojangUuidwith the Mojang verified UUID. After a username is released and reclaimed by a different premium account (Mojang frees a released name after about 37 days), the new owner logs into the previous user's stored account: same UUID, no password, and any permissions bound to that UUID (for example operator).Fix
In that branch, when the name is premium and the stored
mojangUuiddiffers from the Mojang verified profile UUID, deny the login with a dedicated reason and message instead of returning success.Verified
Reproduced end to end on Velocity plus Paper. Before the fix, a premium account with a different Mojang UUID received the stored victim UUID with no password and could run operator commands. After the fix the same login is rejected at PreLogin and never reaches the backend. The UUID mismatch state was seeded directly in the database, since the name release itself is Mojang policy and not part of the plugin.