Mojira Archive
MC-131153

Structures can be saved in arbitrary directories

The bug

Apparently caused by the fix of MC-123064 structure names containing dots can now be used to select the current or parent directory.

How to reproduce

  1. /setblock ~ ~ ~ structure_block[mode=save]{mode:"SAVE",name:"../test"}
    
  2. Open the structure block GUI and click "SAVE"
    The structure was not saved in the structures folder but instead in the parent directory

Possible solutions

The easiest solution might be using a replacement character which is not allowed as part of a resource location. It would probably be a good idea to provide this as a method of the resource location class returning it as a sanitized path.

If you are searching for other solutions you might want to look at the ones in MC-131152, which are however mainly designed for that specific bug.

Fixed

Marcono1234

[Mojang] Bartosz Bok

2018-06-10, 12:31 AM

2018-06-16, 12:39 AM

2018-06-13, 12:00 PM

1

2

Confirmed

structure_block

Minecraft 1.13-pre1

Minecraft 1.13-pre2