Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
2.2.1
-
None
-
Independent of environment
-
Patch
Description
In Struts 2.2.1 (and also in trunk), org.apache.struts2.interceptor.FileUploadInterceptor cleans up uploaded files after the action finishes. The first problem is that the action might throw an exception. FileUploadInterceptor does not use try...finally, so any action exception will result in files not being cleaned up. The second problem is that something earlier in the interceptor stack might throw an exception, in which case FileUploadInterceptor will not even be invoked. The correct solution is for FilterDispatcher to clean up the uploaded files.