Skip to content

Fix login start packet decoding for 1.18.2 up to 1.20.2#421

Merged
itzg merged 2 commits into
itzg:masterfrom
solidDoWant:fix/login-start-1.18.2-forward-1
Jun 29, 2025
Merged

Fix login start packet decoding for 1.18.2 up to 1.20.2#421
itzg merged 2 commits into
itzg:masterfrom
solidDoWant:fix/login-start-1.18.2-forward-1

Conversation

@solidDoWant

Copy link
Copy Markdown
Contributor

Currently, the project can only properly decode login start packets for 1.20.2 forward. The expected format of this packet has changed several times in the preceding releases:

  • 1.19 through 1.19.2 added support for sending player keypair data, and the player UUID is optional
  • 1.18.2 backwards does not include a UUID

Because of this, parsing player info for versions older than 1.20.2 fails, causing other features like webhooks and allow/deny lists to fail.

This adds version-dependent parsing logic to the login start packet parser. This should now parsing packets for most non-beta MC packets, if not all.

@itzg itzg left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome!

Just the additional inline reference links and I'm good to merge. I know you already have them later in protocol list, but will help inline.

Comment thread mcproto/decode.go Outdated
Comment thread mcproto/decode.go Outdated
@solidDoWant
solidDoWant requested a review from itzg June 29, 2025 06:42
Signed-off-by: Fred Heinecke <fred.heinecke@yahoo.com>
Signed-off-by: solidDoWant <fred.heinecke@yahoo.com>
@solidDoWant
solidDoWant force-pushed the fix/login-start-1.18.2-forward-1 branch from 3bef4a0 to c50a377 Compare June 29, 2025 06:45

@itzg itzg left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, update. Thanks.

@itzg
itzg merged commit 805cebd into itzg:master Jun 29, 2025
2 checks passed
@itzg itzg added the bug Something isn't working label Jun 29, 2025
@itzg

itzg commented Jun 29, 2025

Copy link
Copy Markdown
Owner

This is released in https://github.com/itzg/mc-router/releases/tag/1.32.1

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

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants