ViaVersion/ViaFabric

DataFormatException with large system chat packets [1.20.4 -> 1.19.4]

Xenapte opened this issue · 5 comments

/viaversion dump Output

https://dump.viaversion.com/1b809d682ac2e7b51102c66a0fe2a124a43be563ecc606bf06843fd147894500

Console Error

https://mclo.gs/aihPUyW

Yes, I know this is a bit long because it contains the entire data of that large packet.

Bug Description

Some servers have plugins that allow arbitrary item to be displayed as a weapon in death messages. Killing players with an item that has a large NBT data size causes players running ViaFabric to disconnect with the DataFormatException.

Steps to Reproduce

  1. Set up a 1.19.4 server with plugins/mods that show any arbitrary item as weapon on death (e.g. PurpurMC with the config of player-deaths-always-show-item: true)
  2. Log in on a 1.20.4 client with ViaFabric installed
  3. Fill a shulker box with around 80 KB of data using books (my logs contain the NBT data of the exact shulker box that was used to generate the exception) - don't make it too long or nothing about its data will be sent to the client.
  4. Use the shulker box to kill some player.

Expected Behavior

The death message is displayed correctly with the shulker box as the weapon item.

Additional Server Info

Kick screen.

Checklist

  • I have checked if this is specific to ViaFabric platform, and doesn't happen when running it on other platforms (Paper/Sponge/Velocity/Waterfall).
  • I have included a ViaVersion dump.
  • If applicable, I have included a paste (not a screenshot) of the error.
  • I have tried the latest build(s) from https://ci.viaversion.com/ and the issue still persists.

Running into the same issue with ViaFabricPlus.

Closing this issue as OP has outdated ViaVersion, if you can reproduce this with latest viafabric + viaversion jars combined then make a reply and it will be reopened.

Can confirm this still exists with the latest viafabric-0.4.14+68-main. In fact, trying to paste the command to summon that huge NBT data item into a command block causes a kick too, for the server sends the full command as feedback.

New viaversion dump: https://dump.viaversion.com/1b809d682ac2e7b51102c66a0fe2a124a43be563ecc606bf06843fd147894500
(I'll update the link in the issue report itself too)

Command used to summon the item: https://mclo.gs/pAvfoZk