fix(premium): send premium list via triggering player and persist non-chunked list - #3143
Open
HEBEI77 wants to merge 1 commit into
Open
fix(premium): send premium list via triggering player and persist non-chunked list#3143HEBEI77 wants to merge 1 commit into
HEBEI77 wants to merge 1 commit into
Conversation
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.
See #3116.
Problem: premium users cannot log in when the backend whitelist is enabled on Velocity networks.
Impact: the proxy never learns premium names, keeps sending offline UUIDs, and the backend whitelist kicks even though the premium UUID is whitelisted.
Root cause is two parts. BungeeReceiver.java sends the premium list on proxy.started using only getOnlinePlayers as carrier and drops it when empty. VelocityProxyBridge.java and BungeeProxyBridge.java persist chunked lists and set/unset to premium_names.cache but not the non-chunked premium.list path.
Fix: fall back to the triggering player when no online player exists at send time in BungeeReceiver.java:122. Persist the non-chunked list like the other paths in VelocityProxyBridge.java:296 and BungeeProxyBridge.java:293.
Test: BungeeReceiverTest 11 run 0 fail, new test pins 0 online players sends via triggering player and 1 online player uses fresh carrier. VelocityProxyBridgeTest 34 run 0 fail, BungeeProxyBridgeTest 21 run 0 fail, new tests send a non-chunked list, wait for premium_names.cache, restart the bridge from the same dir, and prelogin/handshake forces online mode.
Limits: fresh setup with the whitelist on from the start where ServerConnected never fires and proxy.started is never sent still needs docs or whitelist handling. I did not change that path here.