mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-21 08:17:34 +00:00
Do not register plugin commands without valid permissions
this could lead to harmful results, e.g. if a developer typo'd while writing the plugin.yml, an admin-only command could become accessible to everyone, since commands are by default accessible by everyone.
This commit is contained in:
parent
1fafce6d6f
commit
31a176286d
@ -199,7 +199,11 @@ abstract class PluginBase implements Plugin, CommandExecutor{
|
||||
$newCmd->setPermission($data["permission"]);
|
||||
}else{
|
||||
$this->logger->error("Permission must be a string, " . gettype($data["permission"]) . " given for command $key");
|
||||
continue;
|
||||
}
|
||||
}else{
|
||||
$this->logger->error("No permission set for command $key");
|
||||
continue;
|
||||
}
|
||||
|
||||
if(isset($data["permission-message"])){
|
||||
|
Loading…
x
Reference in New Issue
Block a user