Make sure large file uploads are not loaded into memory

Description

The current implementation relies on restlets for extracting the file from the POST multipart entity body. The RestletFileUpload is used to parse the request and yields an array of FileItems. From these FileItems an InputStream can be requested. If the implementation is done wrong (non-streaming) it will cause out of memory exceptions if some devious character decides to upload a very large file.

Environment

None

Activity

Show:
Hannes Ebner
May 12, 2016, 9:08 PM

Added FileCleaningTracker to DiskFileItemFactory; introduced utility function and carried out some cleanup in the code

Hannes Ebner
May 12, 2016, 9:06 PM

There is a disk cache for files exceeding a certain treshold, so currently not the whole content is loaded into memory which is good. However, there is no active cleanup thread for removing old temporary files. This needs to be fixed before this issue can be closed.

Hannes Ebner
May 11, 2016, 8:52 PM

Double check default behavior of DiskFileItemFactory.

Fixed

Assignee

Hannes Ebner

Reporter

Matthias Palmér

Labels

None

Components

Fix versions

Priority

Normal