geforkt von Mirrors/Paper
Fix some modded clients getting kicked for invalid payload - Fixes #4201
Dieser Commit ist enthalten in:
Ursprung
9a12d91631
Commit
1622581fc9
@ -40,8 +40,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
packetplayincustompayload.data.readBytes(data);
|
packetplayincustompayload.data.readBytes(data);
|
||||||
+
|
+
|
||||||
+ // Paper start - Brand support
|
+ // Paper start - Brand support
|
||||||
+ if (packetplayincustompayload.tag.equals(MINECRAFT_BRAND))
|
+ if (packetplayincustompayload.tag.equals(MINECRAFT_BRAND)) {
|
||||||
+ this.clientBrandName = new PacketDataSerializer(Unpooled.copiedBuffer(data)).readUTF(256);
|
+ this.clientBrandName = data.length < 512 ? new String(data) : "unknown-too-large";
|
||||||
|
+ }
|
||||||
+ // Paper end
|
+ // Paper end
|
||||||
server.getMessenger().dispatchIncomingMessage(player.getBukkitEntity(), packetplayincustompayload.tag.toString(), data);
|
server.getMessenger().dispatchIncomingMessage(player.getBukkitEntity(), packetplayincustompayload.tag.toString(), data);
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren