Mojira Archive
MC-121811

NBT path parser might be too lenient

The bug

The NBT path parser used by /data get|remove and /execute store result|success entity|block might be too lenient. It does not require the path piece separator . (period) between pieces and the separator can be repeated multiple times.

This allows constructs like the following:

Inventory....[0]Count"Test"

Possible different notation

"Inventory".0."Count"
"Inventory"/0/"Count"

Keys would always require quotation marks, list indices would just be the index.
When parsing, a strings would be treated as compound keys and integers as list indices. The separator would be required.

In my opinion a slash (or other taller characters) make it easier to see the distinguish path pieces.

Fixed

Marcono1234

[Mojang] Nathan Adams

2017-11-11, 12:35 AM

2018-02-05, 02:06 PM

2018-02-05, 02:06 PM

3

2

Confirmed

/data, /data-get, /data-remove, /execute-store, nbt-path

Minecraft 17w45b

Minecraft 18w06a