Skip to content

Fix 26.2 login success/sessionId and play login onlineMode fields - #1216

Open
robertvandervoort wants to merge 1 commit into
PrismarineJS:pc_26_2from
robertvandervoort:fix/26.2-login-protocol-fields
Open

Fix 26.2 login success/sessionId and play login onlineMode fields#1216
robertvandervoort wants to merge 1 commit into
PrismarineJS:pc_26_2from
robertvandervoort:fix/26.2-login-protocol-fields

Conversation

@robertvandervoort

Copy link
Copy Markdown

Summary

Fixes incomplete 26.2 protocol definitions that cause partial packet reads on every join.

Verified against decompiled Spigot/NMS 26.2:

  1. login.toClient.success / ClientboundLoginFinishedPacket

    • Adds sessionId: UUID after the GameProfile fields.
    • Without this, protodef leaves 16 bytes unread (Chunk size is N but only N-16 was read).
  2. play.toClient.login / ClientboundLoginPacket

    • Adds onlineMode: bool immediately before enforcesSecureChat.
    • Wire order is (…, worldState, onlineMode, enforcesSecureChat).
    • Without this, onlineMode is consumed as enforcesSecureChat and 1 byte is left unread, so clients mis-read whether secure chat is enforced.

Test plan

  • Live join to Spigot 26.2 (protocol 776) with Mineflayer
  • Confirm partial packet / Chunk size is … but only … was read warnings for success and login go to zero
  • Confirm parsed login.onlineMode === true and login.enforcesSecureChat matches server enforce-secure-profile

Notes

Base is pc_26_2 as requested by the automated 26.2 data PR workflow.

ClientboundLoginFinishedPacket (login success) now includes a
server sessionId UUID after the GameProfile. Without it, protodef
reports a 16-byte partial read on every join.

ClientboundLoginPacket (play login) now includes onlineMode before
enforcesSecureChat. Without it, the onlineMode byte is consumed as
enforcesSecureChat and one byte is left unread, so clients mis-read
whether secure chat is enforced.

Verified against decompiled:
- ClientboundLoginFinishedPacket(GameProfile, UUID sessionId)
- ClientboundLoginPacket(..., boolean onlineMode, boolean enforcesSecureChat)

Tested live against Spigot 26.2 (protocol 776): partial-packet
warnings drop to zero; login.onlineMode=true and
enforcesSecureChat follows server enforce-secure-profile.
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