mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-01 05:47:45 +01:00
Fix some modded clients getting kicked for invalid payload - Fixes #4201
This commit is contained in:
parent
9a12d91631
commit
1622581fc9
@ -40,8 +40,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
packetplayincustompayload.data.readBytes(data);
|
||||
+
|
||||
+ // Paper start - Brand support
|
||||
+ if (packetplayincustompayload.tag.equals(MINECRAFT_BRAND))
|
||||
+ this.clientBrandName = new PacketDataSerializer(Unpooled.copiedBuffer(data)).readUTF(256);
|
||||
+ if (packetplayincustompayload.tag.equals(MINECRAFT_BRAND)) {
|
||||
+ this.clientBrandName = data.length < 512 ? new String(data) : "unknown-too-large";
|
||||
+ }
|
||||
+ // Paper end
|
||||
server.getMessenger().dispatchIncomingMessage(player.getBukkitEntity(), packetplayincustompayload.tag.toString(), data);
|
||||
} catch (Exception ex) {
|
||||
|
Loading…
Reference in New Issue
Block a user