Send invalid nbt of some mod item through chatbox can cause client crash
zyxkad opened this issue ยท 2 comments
Describe
Some mod will add tooltip in their items, and some of the tooltip may depends on a strict NBT parser, which means if you sending an invalid item with the show_item
action through chatbox, client can crash when they hovering on the chat.
Steps to reproduce
- Install Sophisticated Backpacks mod, as well as AP and CC:T
- With a chatbox, run
peripheral.find('chatBox').sendFormattedMessage(textutils.serialiseJSON({ text = 'Hover this to crash your client', hoverEvent = { action = 'show_item', contents = { id = 'sophisticatedbackpacks:backpack', tag = textutils.serialiseJSON({contentsUuid={0,0,0,0}}, { nbt_style=true }), }, }, }))
- Hover on the text
- The game will crash
Multiplayer?
No
Version
1.20.1-0.7.38r
Minecraft, Forge and maybe other related mods versions
Minecraft 1.20.1, Forge 47.2.0, sophisticatedbackpacks-1.20.1-3.20.5
Screenshots or Videos
No response
Crashlog/log
No response
The real issue is CC:T is serializing {0,0,0,0}
as a NBT Tag List [0,0,0,0]
, but it should be serialized as NBT Integer List [I;0,0,0,0]