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

setFileSizeMax validation is happening after ENTIRE file gets uploaded

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.2
    • 1.2.1
    • None
    • 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

        1. FILEUPLOAD-145.patch
          3 kB
          Jochen Wiedmann

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: