482057 - MultiPartInputStream temp file permissions should be limited to user
This commit is contained in:
parent
efecc0c8cf
commit
21388d4765
|
@ -135,7 +135,14 @@ public class MultiPartInputStreamParser
|
||||||
protected void createFile ()
|
protected void createFile ()
|
||||||
throws IOException
|
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 = 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)
|
if (_deleteOnExit)
|
||||||
_file.deleteOnExit();
|
_file.deleteOnExit();
|
||||||
|
|
Loading…
Reference in New Issue