diff --git a/jetty-util/src/main/java/org/eclipse/jetty/util/MultiPartInputStreamParser.java b/jetty-util/src/main/java/org/eclipse/jetty/util/MultiPartInputStreamParser.java index 755e6bd8307..9027faa724c 100644 --- a/jetty-util/src/main/java/org/eclipse/jetty/util/MultiPartInputStreamParser.java +++ b/jetty-util/src/main/java/org/eclipse/jetty/util/MultiPartInputStreamParser.java @@ -135,7 +135,14 @@ public class MultiPartInputStreamParser protected void createFile () throws IOException { + /* Some statics just to make the code below easier to understand + * This get optimized away during the compile anyway */ + final boolean USER = true; + final boolean WORLD = false; + _file = File.createTempFile("MultiPart", "", MultiPartInputStreamParser.this._tmpDir); + _file.setReadable(false,WORLD); // (reset) disable it for everyone first + _file.setReadable(true,USER); // enable for user only if (_deleteOnExit) _file.deleteOnExit();