Uploaded image for project: 'MyFaces Tomahawk'
  1. MyFaces Tomahawk
  2. TOMAHAWK-1381

HtmlInputFileUpload does not fail gracefully when filesize exceeds uploadMaxFileSize web.xml value

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.1.7, 1.1.8
    • 1.1.9
    • File Upload
    • None

    Description

      When uploading a file using the HtmlInputFileUpload that exceeds that uploadMaxFileSize web.xml setting the system fails without error and no form data is not processed by JSF.

      I think that there are a number of reasons for this:

      • There is a bug in commons-fileupload that prevents failures from being handled correctly (see FILEUPLOAD-169)
      • MultipartRequestWrapper calls FileUploads setSizeMax, this is the size for the total upload, and not individual files, it should call setFileSizeMax
      • HtmlFileUploadRenderer calls fileUpload.parseRequest(request), this will fail if any size exceptions are thrown, it would be better to use fileUpload.getItemIterator and catch each exception.

      Attachments

        1. TOMAHAWK-1381-fileupload6.patch
          69 kB
          Leonardo Uribe
        2. testUsedForSolveTOMAHAWK1381.zip
          41 kB
          Leonardo Uribe
        3. file-upload2.patch
          22 kB
          Phillip Webb
        4. file-upload.patch
          23 kB
          Phillip Webb

        Issue Links

          Activity

            People

              lu4242 Leonardo Uribe
              philw Phillip Webb
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: