Skip to content

fix(premium): send authoritative premium list to proxy when disabled or empty - #3130

Open
strobil wants to merge 2 commits into
AuthMe:masterfrom
Vanilla-Game:fix/premium-list-sync-when-disabled
Open

fix(premium): send authoritative premium list to proxy when disabled or empty#3130
strobil wants to merge 2 commits into
AuthMe:masterfrom
Vanilla-Game:fix/premium-list-sync-when-disabled

Conversation

@strobil

@strobil strobil commented Sep 2, 2026

Copy link
Copy Markdown

Fixes #3127.

Two things were wrong in how the premium list reaches the proxy.

BungeeReceiver's proxy.started handler queried stored premium names without looking at settings.enablePremium, and didn't send anything at all when the list was empty. So a proxy restart re-populated the cache from stale premiumUUID rows even with the feature disabled, and premium_names.cache could never be cleared. The first commit gates the query on enablePremium and always sends the list — an empty one is authoritative, and both proxy bridges already handle a zero-name chunk by replacing and persisting their cache, so nothing had to change on that side.

That alone still depends on a proxy restart (the resync only fires on proxy.started) and on a player connection to carry the message. The second commit makes the state converge per player instead: ProxyLoginRequestValidator.validate() had no enablePremium check at all, unlike canBypassWithPremium, so a proxy-verified claim for a player whose row still had a premiumUuid was accepted while the feature was off. It now rejects the claim and answers with the existing premium.unset; since validate() sits on both the join-time path and performLogin, one gate covers both.

Stored premiumUUID values stay in the database on purpose — ignored while disabled, back when re-enabled — as described in the issue.

Three new tests, full authme-core suite is green.

…or empty

The proxy.started handler queried stored premium usernames without
checking settings.enablePremium and skipped the send entirely when the
list was empty, so the proxy kept a stale premium_names.cache and went
on verifying enrolled players after the feature was disabled on the
backend.

Gate the DB query on enablePremium and always send the list: an empty
list is authoritative and makes the proxy replace and persist an empty
cache. Both proxies already handle a zero-name chunked list.

Fixes AuthMe#3127
…ium is disabled

ProxyLoginRequestValidator.validate() had no enablePremium gate, unlike
canBypassWithPremium: a proxy-verified claim for a player whose row still
carries a premiumUuid was accepted while the feature was disabled. Reject
it and answer with premium.unset so the proxy drops the stale entry and
persists its cache. State now converges per player on first contact,
without waiting for a proxy restart to trigger the full premium.list
resync.

Refs AuthMe#3127
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Disabling enablePremium still leaves Velocity in premium mode for stored users

1 participant