ProtocolSupport / ProtocolSupport

Support 1.18, 1.17, 1.16, 1.15, 1.14, 1.13, 1.12, 1.11, 1.10, 1.9, 1.8, 1.7, 1.6, 1.5, 1.4.7 clients on Spigot/Paper 1.18.1

Home Page:https://protocol.support/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Clearing title sends a malformed packet to 1.17.1 Clients

bendgk opened this issue · comments

Before submitting your issue, please check the following:

  • ProtocolSupport version (/ps buildinfo)
    [buildtime=2021.09.22 at 17:18:06 EDT, buildhost=unknown, buildnumber=unknown, buildgit=unknown]
  • Server version Paper 1.17.1 build 274

When executing the command /title @a clear or /title @a reset any 1.17.1 client crashes (1.16.5 and below will not crash)

The error the client receives is:
IndexOutOfBoundsException: readerIndex(1) + length(1) exceeds writerIndex(1): PooledUnsafeDirectByteBuf(ridx: 1, widx: 1, cap: 1)

Upon further inspection with Wireshark (compression and encryption disabled) it seems that the issue is with the clear title packet translation. In 1.17 the packet requires an extra boolean field which appears to be missing.

What was sent: [0x01, 0x10]

// last byte is 0 if title is cleared and 1 if title is reset
What should be send:  [0x02, 0x10, 0x01]