Don't throw exception on bogus absolute path (http://xxx//blah)

This commit is contained in:
Mike Primm 2011-06-29 14:16:12 -05:00
parent e6a8e54172
commit 1102c08b3e

View File

@ -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())