Commits

md_5 authored 5043fb1d0ed
SPIGOT-3744: Missing permission check in broadcastCommandMessage
No tags

src/main/java/org/bukkit/command/Command.java

Modified
403 403 }
404 404
405 405 Set<Permissible> users = Bukkit.getPluginManager().getPermissionSubscriptions(Server.BROADCAST_CHANNEL_ADMINISTRATIVE);
406 406 String colored = ChatColor.GRAY + "" + ChatColor.ITALIC + "[" + result + ChatColor.GRAY + ChatColor.ITALIC + "]";
407 407
408 408 if (sendToSource && !(source instanceof ConsoleCommandSender)) {
409 409 source.sendMessage(message);
410 410 }
411 411
412 412 for (Permissible user : users) {
413 - if (user instanceof CommandSender) {
413 + if (user instanceof CommandSender && user.hasPermission(Server.BROADCAST_CHANNEL_ADMINISTRATIVE)) {
414 414 CommandSender target = (CommandSender) user;
415 415
416 416 if (target instanceof ConsoleCommandSender) {
417 417 target.sendMessage(result);
418 418 } else if (target != source) {
419 419 target.sendMessage(colored);
420 420 }
421 421 }
422 422 }
423 423 }

Everything looks good. We'll let you know here if there's anything you should know about.

Add shortcut