Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.3.1
-
None
Description
FileUploadBase has several instances where the InputStream "input" is not closed when an Exception is throw. This can potentially be a resource leak and is best avoided.
The first case is easy to deal with, as the InputStream does not need to be created until after the SizeLimitExceededException has been thrown.
The next case occurs if the boundary is not found.
This check could be moved to before the size check, however that would change the behaviour slightly, as FileUploadException would be thrown instead of SizeLimitExceededException if both boundary and size are wrong.
The last case is where InvalidContentTypeException is thrown. This cannot easily be avoided.
Attachments
Issue Links
- relates to
-
SOLR-13878 Update commons-fileupload to 1.4 to fix potential resource leak issue
- Closed