Permalink
Browse files

Fix a spamming exploit with pipe commands allowing to send multiple m…

…essages with one line.
  • Loading branch information...
1 parent c2bae03 commit d86b839a12f16e0c6e5d962bc8baa028d81ee8be @LeonBlade LeonBlade committed Apr 12, 2012
Showing with 4 additions and 1 deletion.
  1. +4 −1 src/main/java/com/thevoxelbox/voxelsniper/VoxelSniperListener.java
@@ -136,7 +136,10 @@ public void onPlayerPreprocessCommand(PlayerCommandPreprocessEvent event) {
String[] commands = event.getMessage().split("\\|");
for (String command : commands) {
- event.getPlayer().chat(command.trim());
+ command = command.trim();
+ if (command.charAt(0) == '/') {
+ event.getPlayer().chat(command);
+ }
}
event.setCancelled(true);

0 comments on commit d86b839

Please sign in to comment.