Skip to content

Fix Floodgate handshakes after validated payload is consumed - #1

Merged
THEMPGUYActions merged 2 commits into
mainfrom
fix/floodgate-consumed-marker-v1.4.10
Oct 20, 2026
Merged

THEMPGUYActions merged 2 commits into
mainfrom
fix/floodgate-consumed-marker-v1.4.10

Conversation

@THEMPGUYActions

@THEMPGUYActions THEMPGUYActions commented Oct 20, 2026 •

Copy link
Copy Markdown

Summary

Floodgate validates and strips its encrypted handshake payload before Paper's PlayerHandshakeEvent reaches BungeeGuard. That made the v1.4.9 hostname-marker bypass miss valid Bedrock/Education sessions.

This adds an optional reflective integration with Floodgate's handshake callback. Only after Floodgate reports a successfully validated Floodgate player, BungeeGuard inserts a cryptographically random, short-lived, one-use marker immediately after the server-hostname component in the sanitized handshake. BungeeGuard consumes and strips that marker before forwarding the hostname. Normal Java connections still require their configured BungeeGuard token, and a forged marker is not enough to bypass the token check.

Changes

  • Add optional Floodgate handshake callback integration without a compile-time Floodgate dependency.
  • Declare Floodgate as a soft dependency so its API initializes first.
  • Insert the private marker in the correct serialized-handshake position, before forwarded IP, UUID, and properties.
  • Strip and consume trusted markers from BungeeCord handshake hostnames.
  • Add regression tests for validated markers, marker placement, single-use behavior, forged markers, and existing Java token checks.
  • Bump version to 1.4.10.

Verification

  • GitHub Actions Maven build and verification passed on the current PR head.
  • JUnit: 10 tests, 0 failures, 0 errors, 0 skipped.
  • git diff --check passed.
  • A live Bedrock/Education login has not yet been tested.

@THEMPGUYActions
THEMPGUYActions merged commit f25fadb into main Oct 20, 2026
2 checks passed
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