Critical Dupe Bug with Doors and Bridges
LadyCailinBot opened this issue ยท 8 comments
CRAFTBOOK-3350 - Reported by Phreag
Hey, some players on my Server found a bug which allows it to convert materials allowed for Bridge or Door into any other Material allowed for this mechanism.
How to use it:
- Place down a Bridge or Gate in a way that you can completely remove all Blocks without destroying all signs.
Bridge Signs can be placed under the bridge. Use a worthless material. - Close the Bridge or Open the Door by clicking on a sign (for Door click the sign below).
All Blocks are now saved in the Sign you clicked on. - Replace the remaining Blocks with worthier material allowed for Bridges/Gates. For Door recreate the upper sign.
- Click on the Sign which has the Blocks to expand it and...
Voila you converted all Block to a different material!
This Bug does not Work with Gate, since it saves the Block Type on the Sign.
To Fitx it you should just save the Block Type in the Sign.
The Bug was tested on the latest Build #203 and was also present in our old version from somewhere in September 2017.
A visual demonstration can be seen here: https://youtu.be/YVuF26-63Yg?t=231 (german Language)
Hope you fix that fastly, because now i needed to disable the affected mechanics to avoid the servers economy system to be overfilled with valuable materials.
P.S.
Another possible exploit: With sign copier Plugins players can copy signs with stored blocks and dupe the blocks inside.
For my own Plugin i fixed it by blocking it on craftbook signs, but maybe it could be useful to write down any sign placed in a config file and use the sign location only as identifier so duping the sign would be useless.
Comment by me4502
So for this issue it hasn't been fixed at this point as the type of the material won't always fit on the sign. With gates they're on seperate lines which mostly fixes it.
As for the second part, any plugin that allows copying signs should send the sign place event. CraftBook will reset those values when the sign placed event occurs. CraftBook's Sign Copier does this, I would consider it a bug in any sign copier plugin that doesn't.
Comment by me4502
I've added an enforce type option to doors/bridges. It may have some issues with blocks with longer names.
Comment by Phreag
Confirmed.
The Bug seems to be fixed.
Maybe you could write Block type in the third row of the sign?
This will allow 2 more Characters to have place on the sign.
Comment by Phreag
Or you use third and 4th row and split the string so you should not have any more issues with long names.
Comment by Phreag
Hm, or you just save it in a separate .yml file.
If you just save it like "Signlocation: Material:data" there should be no more Problems with long names and it is not possible to change it by any trick.
Comment by me4502
CraftBook is used on servers with greater than 1 million doors/bridges setup. A file like that is unrealistic as it doesn't scale, and also can easily become desynced if something moves it in a way the plugin can't detect. (Eg, worldedit)