From 65eba06980c915c0292e5e047c85eaf87bb202b3 Mon Sep 17 00:00:00 2001 From: md_5 Date: Sat, 19 Jul 2014 21:22:20 +1000 Subject: [PATCH] Don't let Bungee run in dirs with ! in name. Java uses ! to indicate a resource inside of a jar/zip/other container. Running Bungee from within a directory that has a ! will cause this to muck up. --- proxy/src/main/java/net/md_5/bungee/BungeeCord.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/proxy/src/main/java/net/md_5/bungee/BungeeCord.java b/proxy/src/main/java/net/md_5/bungee/BungeeCord.java index cdbd5b33b..871169b08 100644 --- a/proxy/src/main/java/net/md_5/bungee/BungeeCord.java +++ b/proxy/src/main/java/net/md_5/bungee/BungeeCord.java @@ -162,6 +162,9 @@ public class BungeeCord extends ProxyServer @SuppressFBWarnings("DM_DEFAULT_ENCODING") public BungeeCord() throws IOException { + // Java uses ! to indicate a resource inside of a jar/zip/other container. Running Bungee from within a directory that has a ! will cause this to muck up. + Preconditions.checkState( new File( "." ).getAbsolutePath().indexOf( '!' ) == -1, "Cannot use BungeeCord in directory with ! in path." ); + System.setSecurityManager( new BungeeSecurityManager() ); try