Skip to content

Temporary files not being cleaned up on WAF JUnit tests #65

@meg23

Description

@meg23

From kevin.w.wall@gmail.com on November 11, 2009 21:33:01

The WAF class InterceptingServletOutputStream is creating temporary
files via:

this.out = new RandomAccessFile ( File.createTempFile("oew", ".hop"),
"rw" );

that are not being cleaned up when certain WAF JUnit tests are being run.
For example,

/tmp> ls -l oew7672934197290659613.hop
-rw------- 1 kevin users 57 2009-11-09 21:29 oew7672934197290659613.hop
/tmp> cat oew7672934197290659613.hop
This is the body of a response for /here_is_the_2008
/tmp>

I just found 81, mostly empty files of pattern

 /tmp/oew###################.hop

on my system. Most likely it was because of all the WAF tests that
were failing. However might be a good idea to create an @afterclass
annotation that cleans them up in case of test failures (or could do
in teardown() method as well).

I have not ran any WAF JUnit tests since they've been fixed so this
probably may have disappeared, but certainly has the potential to
reappear again at any time.

Original issue: http://code.google.com/p/owasp-esapi-java/issues/detail?id=55

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions