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

Improve permission checking for chat broadcast subscribers #6516

Open
dktapps opened this issue Nov 17, 2024 · 0 comments
Open

Improve permission checking for chat broadcast subscribers #6516

dktapps opened this issue Nov 17, 2024 · 0 comments
Labels
BC break Breaks API compatibility Category: API Related to the plugin API Opinions Wanted Request for comments & opinions from the community Type: Enhancement Contributes features or other improvements to PocketMine-MP

Comments

@dktapps
Copy link
Member

dktapps commented Nov 17, 2024

Description

Currently, the chat broadcast system relies on each recipient to do permission checks.

This is currently done in Player in a very janky way by (un)subscribing to the needed channels when permissions are updated.

This proposes that:

  • Any CommandSender can subscribe to a broadcast channel, irrespective of permissions
  • However, broadcastMessage() should check if the subscriber has the permission associated with the channel in question

Justification

More consistent behaviour. If more types of CommandSender are added by plugins (e.g. RCON) and subscribed to these channels, their permissions won't be enforced, which could lead to data being leaked. This is sort of similar to the easy security issues caused by having commands check their own permissions rather than the server doing it.

Alternative methods

@dktapps dktapps added Category: API Related to the plugin API BC break Breaks API compatibility Type: Enhancement Contributes features or other improvements to PocketMine-MP Opinions Wanted Request for comments & opinions from the community labels Nov 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BC break Breaks API compatibility Category: API Related to the plugin API Opinions Wanted Request for comments & opinions from the community Type: Enhancement Contributes features or other improvements to PocketMine-MP
Projects
None yet
Development

No branches or pull requests

1 participant