commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rob Tompkins (JIRA)" <j...@apache.org>
Subject [jira] [Closed] (FILEUPLOAD-145) setFileSizeMax validation is happening after ENTIRE file gets uploaded
Date Tue, 06 Jun 2017 04:22:18 GMT

     [ https://issues.apache.org/jira/browse/FILEUPLOAD-145?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Rob Tompkins closed FILEUPLOAD-145.
-----------------------------------

1.2.1 released.

> setFileSizeMax validation is happening after ENTIRE file gets uploaded
> ----------------------------------------------------------------------
>
>                 Key: FILEUPLOAD-145
>                 URL: https://issues.apache.org/jira/browse/FILEUPLOAD-145
>             Project: Commons FileUpload
>          Issue Type: Bug
>    Affects Versions: 1.2
>         Environment: All, however I mainly use Mac OSX
>            Reporter: Eric Hermanson
>            Assignee: Jochen Wiedmann
>             Fix For: 1.2.1
>
>         Attachments: FILEUPLOAD-145.patch
>
>
> The LimitedInputStream *IS* correctly raising a FileUploadBase.FileSizeLimitExceededException
in the event of a too-large file.  HOWEVER, the exception isn't getting *processed* until
AFTER all of the data is read.  This is because of what appears to be a bug in MultipartStream.ItemInputStream.close()
(or a bug in close handling after the FileSizeLimitExceededException is raised).  After the
LimitedInputStream correctly raises the file size exception, someone attempts to close the
MultipartStream, but the close() method repeatedly calls 'makeAvailable()' which ends up reading
the rest of the file upload data anyways, REGARDLESS of the size limit exception being raised.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message