ericyoondotcom / MinecraftManhunt

Minecraft Bukkit plugin to run Manhunt minigames, with Discord music integration
GNU General Public License v3.0
27 stars 7 forks source link

Potential security issue #76

Open ghost opened 6 months ago

ghost commented 6 months ago

Checking event.getView().getTitle() to see whether your custom inventory is being used is unsafe, as renaming a chest in an anvil allows users to set their own inventory titles. The correct way to check if your custom inventory is involved with an event is by using custom holders, see here: https://docs.papermc.io/paper/dev/custom-inventory-holder

https://github.com/ericyoondotcom/MinecraftManhunt/blob/d4e501883fb1baa90a97cdbad9249825dff510de/MinecraftManhunt/src/main/java/com/yoonicode/minecraftmanhunt/PluginListener.java#L67