SaberLLC / Saber-Factions

The Ultimate Factions Plugin
GNU General Public License v3.0
120 stars 98 forks source link

Potential security issue #267

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/SaberLLC/Saber-Factions/blob/99e606e3a641a6f92a0e0759085913239c5eba68/src/main/java/com/massivecraft/factions/cmd/audit/FChestListener.java#L52