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

Deny permissions if command is issued by a webhook #156

Merged
merged 1 commit into from
Aug 3, 2018
Merged

Deny permissions if command is issued by a webhook #156

merged 1 commit into from
Aug 3, 2018

Conversation

mikroskeem
Copy link
Contributor

And here is the fix.

@aikar
Copy link
Owner

aikar commented Aug 3, 2018

Copying from discord:

this seems like the wrong solution
we need to make permissions support multiple annotations, for OR conditions
and webhooks should have its own permission node
so that you can say @CommandPermission({"webhook", "foo"));
OR
we need a WebhookPermissionResoler
so that you can do stuff like "I know I'm a bridge, figure out permisssible context from the message"

@mikroskeem
Copy link
Contributor Author

I find this PR still valid to get rid of bridge users malicously cluttering bot logs with NPE stacktraces.

However I agree that this could have a better solution at some point.

Commands worked fine for bridge users without @CommandPermission annotation for now though (which means command wouldn't pass PermissionResolver)

@aikar
Copy link
Owner

aikar commented Aug 3, 2018

ok im fine with merging it then, but we def need to approach this more.
I'll open an issue with my thoughts

@aikar aikar merged commit 7742dc3 into aikar:master Aug 3, 2018
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 this pull request may close these issues.

2 participants