Repository navigation
fix(config): warn when restore-full-profile cannot run while login-reassert is disabled - #178
Merged
Conversation
login-reassert.restore-full-profile is only read from inside the late pre-login and game-profile handlers, and all of them return early while login-reassert.enabled is false. An operator who flips only the second key sees no change at all: no log line, no error, just the UUID they were trying to replace (endpoint servermc4321, 2026-10-21: offline UUID c54a0640-... through the tunnel vs Mojang 063f9b8a-... on a direct join). - ConfigLoader warns once at startup for enabled: false + restore-full-profile: true; it is the single config path on both proxy platforms and stays silent on Spigot. - proxy-config.yml and docs/login-plugin-integration.md now state that restore-full-profile only has an effect while enabled is true. - Velocity's game-profile re-assert logs Connect's UUID and the UUID the event carries at DEBUG when they differ, so that class of report is diagnosable from the endpoint log alone. No behaviour change: the floor, its ordering, and both defaults are untouched.
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.
Root cause
login-reassert.restore-full-profileis read only from inside the late pre-login /game-profile handlers (
VelocityLateReassertListener,BungeeLateReassertListener), andevery one of them returns early while
login-reassert.enabledisfalse. So thecombination
enabled: false+restore-full-profile: trueis inert: no warning, no error,no log line naming the keys - the operator believes they restored Mojang UUIDs and nothing
changed.
Field impact (2026-10-21, endpoint
servermc4321, Velocity + VeloAuth): through theConnect tunnel the proxy saw the offline UUID
c54a0640-449b-33a4-8c07-0505d5707171(MD5 offline UUID of
fraze_wireq) while a direct join produced the Mojang UUID063f9b8a-2359-4818-af31-df4a43da1f7d. Backend LuckPerms flagged the player as non-Mojang(type 3) and the join died at the auth/limbo stage. Diagnosis took hours of log reading on
both sides because neither log said the option could not act.
Changes
core/.../config/ConfigLoader.java- one WARN at startup when the loaded proxy confighas
login-reassert.enabled: falsetogether withrestore-full-profile: true(
INERT_RESTORE_FULL_PROFILE_WARNING).ConfigLoader.load()is the single config path onVelocity and Bungee, so every proxy platform gets exactly one line; the
instanceof ProxyConnectConfigguard keeps Spigot silent.core/src/main/resources/proxy-config.yml- therestore-full-profilecomment nowstates it only has an effect while
login-reassert.enabledis true, in addition to theexisting LibreLogin
new-uuid-creator: MOJANGprerequisite.docs/login-plugin-integration.md- same dependency stated for integrators.velocity/.../VelocityLateReassertListener.java- DEBUG line naming Connect's profileUUID and the UUID the
GameProfileRequestEventactually carries when they differ (plus thecurrent
restore-full-profilevalue), so "right player, wrong UUID - but only through thetunnel" is diagnosable from the endpoint log alone.
velocity/AGENTS.md(thevelocity/CLAUDE.mdtarget) - records the inert combinationso the guardrail is not silently deleted later.
No behaviour change: the re-assert floor, its ordering levers, both shipped defaults and
every fail-safe path are untouched. This is the operator-facing guardrail the report asked
for, not a functional fix.
Tests
RED first on the unfixed tree (assertions, not compile errors):
ConfigLoaderTest.warnsWhenRestoreFullProfileCannotRunBecauseLoginReassertIsDisabled-WantedButNotInvoked(nothing warned).ConfigLoaderTest.shippedProxyTemplateMarksRestoreFullProfileAsConditionalOnEnabled-AssertionFailedError(template did not state the dependency).VelocityLateReassertListenerTest.gameProfileLogsConnectAndEventUuidsAtDebugWhenALoginPluginLeftItsOwnAssertionFailedError(no DEBUG line carried both UUIDs).GREEN after the change, with the negative cases pinned so the warning cannot go noisy:
doesNotWarnForTheShippedLoginReassertDefaults(enabled: true/restore-full-profile: false)doesNotWarnWhenOnlyOneLoginReassertKeyIsSet(enabled: false/restore-full-profile: false)gameProfileDoesNotLogUuidsWhenTheProfileAlreadyMatchesLocal gate:
./gradlew buildon JDK 21 - green, including:core:test,:velocity:test,:velocity:eventOrderTest(realVelocityEventManager) and:bungee:test/:spigot:test.core/build/test-results/test/TEST-com.minekube.connect.config.ConfigLoaderTest.xml:tests="12" failures="0" errors="0";velocity/build/test-results/test/TEST-...VelocityLateReassertListenerTest.xml:tests="13" failures="0" errors="0".