From 00a660d019a74897e526e3494fdcc34768cb68e1 Mon Sep 17 00:00:00 2001 From: Mike Primm Date: Thu, 30 Jun 2011 03:16:12 +0800 Subject: [PATCH] Don't throw exception on bogus absolute path (http://xxx//blah) --- src/main/java/org/dynmap/web/handlers/FilesystemHandler.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/org/dynmap/web/handlers/FilesystemHandler.java b/src/main/java/org/dynmap/web/handlers/FilesystemHandler.java index d20b217c..ec22ad3a 100644 --- a/src/main/java/org/dynmap/web/handlers/FilesystemHandler.java +++ b/src/main/java/org/dynmap/web/handlers/FilesystemHandler.java @@ -27,6 +27,7 @@ public class FilesystemHandler extends FileHandler { } @Override protected InputStream getFileInput(String path, HttpRequest request, HttpResponse response) { + if(path == null) return null; path = getNormalizedPath(path); /* Resolve out relative stuff - nothing allowed above webroot */ File file = new File(root, path); if(!file.isFile())