Skip to content

Commit 4d2b101

Browse files
committed
Fix issue 355 by adding a call to file.deleteOnExit().
1 parent 520e167 commit 4d2b101

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/main/java/org/owasp/esapi/waf/internal/InterceptingServletOutputStream.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,10 @@ public InterceptingServletOutputStream(ServletOutputStream os, boolean buffered)
5656
* the prefix and suffix small for less processing. The "oew" is intended
5757
* to stand for "OWASP ESAPI WAF" and the "hop" for HTTP output.
5858
*/
59-
this.out = new RandomAccessFile ( File.createTempFile("oew", ".hop"), "rw" );
59+
File tempFile= File.createTempFile("oew", ".hop");
60+
this.out = new RandomAccessFile (tempFile, "rw" );
61+
tempFile.deleteOnExit();
62+
6063
}
6164

6265
public void reset() throws IOException {

0 commit comments

Comments
 (0)