Uploaded image for project: 'Commons FileUpload'
  1. Commons FileUpload
  2. FILEUPLOAD-145

setFileSizeMax validation is happening after ENTIRE file gets uploaded

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.2
    • Fix Version/s: 1.2.1
    • Labels:
      None
    • Environment:

      All, however I mainly use Mac OSX

      Description

      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.

        Attachments

          Activity

            People

            • Assignee:
              jochen@apache.org Jochen Wiedmann
              Reporter:
              zmonster Eric Hermanson
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: