Double-space (or more) after command alias is no longer accepted, i.e. "f home". Otherwise, command prevention routines (in Factions itself and in other plugins) can be bypassed. For example, preventing the "f home" command wouldn't prevent anyone from using "f home" or "f home" instead.

This commit is contained in:
Brettflan committed 2012-03-19 08:21:06 -05:00
1 parent 8333354926
commit d77cf1fa18
1 file changed
+3
@@ -199,6 +199,9 @@ public abstract class MPlugin extends JavaPlugin
for (String alias : command.aliases)
{
// disallow double-space after alias, so specific commands can be prevented (preventing "f home" won't prevent "f home")
if (commandString.startsWith(alias+" ")) return false;
if (commandString.startsWith(alias+" ") || commandString.equals(alias))
{
List<String> args = new ArrayList<String>(Arrays.asList(commandString.split("\\s+")));