Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Potential security issue #111

Open
ghost opened this issue Jan 26, 2024 · 2 comments · May be fixed by #113
Open

Potential security issue #111

ghost opened this issue Jan 26, 2024 · 2 comments · May be fixed by #113

Comments

@ghost
Copy link

ghost commented Jan 26, 2024

if (item == null || !e.getView().getTitle().contains("VentureChat")) {

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

@HugKitten
Copy link

It's surprising how often this mistake is made

@Aust1n46 Aust1n46 linked a pull request Feb 5, 2024 that will close this issue
@Aust1n46
Copy link
Owner

Aust1n46 commented Feb 6, 2024

Made it 10 years before anyone noticed ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants