Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-121811

NBT path parser might be too lenient

XMLWordPrintable

    • Confirmed

      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.

            dinnerbone [Mojang] Nathan Adams
            marcono1234 [Mod] Marcono1234
            Votes:
            3 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: