Skip to content

Set opts.ranked on real ranked queue attempts - #2

Merged
12problems merged 1 commit into
mainfrom
fix/ranked-queue-anticheat-gate
Aug 18, 2026
Merged

Set opts.ranked on real ranked queue attempts#2
12problems merged 1 commit into
mainfrom
fix/ranked-queue-anticheat-gate

Conversation

@12problems

Copy link
Copy Markdown
Contributor

What

`MPAPI.matchmaking.queue()`'s launcher-anti-cheat gate only runs when the caller explicitly passes `ranked=true` or `lobby_type=RANKED` - it can't infer ranked-ness from the `game_mode` string's `ranked:` prefix alone (see that function's own doc comment in BalatroMultiplayerAPI). `SPDRN._join_queue()` never set it, so the client-side anti-cheat gate silently never ran for any real ranked SPDRN queue attempt.

This is a defense-in-depth fix, not a security-hole fix: the server-side launcher-integrity gate (`isLauncherVerified` in `matchmaking.service.ts`) is completely independent and was never affected - it's keyed off the `game_mode` prefix directly, not anything the client self-reports. A spoofed/bypassed client still gets rejected server-side regardless of this fix. What was broken is SPDRN's own client-side pre-check silently no-opping instead of actually blocking a queue attempt when the launcher's supervision channel isn't healthy.

Verification

Found and fixed while live-testing the full launcher-integrity challenge/response round-trip this session (two launcher-supervised instances matched into a real ranked lobby against a local test server). Confirmed the fix by exercising `MPAPI.matchmaking.queue({ranked=true, ...})`'s gate directly and observing it correctly refuse to queue when the loopback supervision channel wasn't active.

🤖 Generated with Claude Code

MPAPI.matchmaking.queue()'s launcher-anti-cheat gate only runs when the
caller explicitly passes ranked=true or lobby_type=RANKED - it has no way
to infer that from the game_mode string's "ranked:" prefix alone (see that
function's own doc comment). _join_queue() never set it, so the client-side
gate silently never ran for any real ranked SPDRN queue attempt - a no-op
layer of defense-in-depth, not a working one.

The server-side launcher-integrity gate was unaffected either way (it's
independent, keyed off the game_mode prefix directly), so this was never
an actual bypass - just a missing client-side check that should have been
running.
@12problems
12problems merged commit c196a13 into main Aug 18, 2026
@12problems
12problems deleted the fix/ranked-queue-anticheat-gate branch August 18, 2026 13:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant