Uploaded image for project: 'Magnolia'
  1. Magnolia
  2. MAGNOLIA-8902

MultipartRequestFilter sets filesCountMax to 10 by default and only 9 fields are enabled to be sent


    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: High High
    • None
    • 6.2.34
    • None
    • None

      Steps to reproduce

      1. Upload Magnolia to 6.2.30 or more recent
      2. Create a template with a form that contains 10 fields or more where some fields are file inputs.
      3. Change form enctype to multipart/form-data

      Expected results

      Form is sent correctly and you can use the information of the request to do some logic.

      Actual results

      MultipartRequestFilter throws an exception because it can't handle 10 or more fields, but this should only be for "file" type fields and it is counting also text, checkbox, select, etc... fields.


      Increase to a big number the value of the property "fileCountMax" for MultipartRequestFilter filter at the configuration in /server/filters/multipartRequest/. For example: 

      fileCountMax: 100

      Development notes

      Since in Magnolia 6.2.30 changed to commons-fileupload 1.5.0, this library "allows" to set a max of files you can upload in a request, but this library is not checking only files in the request. Is checking ALL the fields (files or not) in the request.

      You can check it in this commit from the github library: https://github.com/apache/commons-fileupload/commit/e20c04990f7420ca917e96a84cec58b13a1b3d17#commitcomment-113912200

        Acceptance criteria

              Unassigned Unassigned
              ioker Francisco J. Giner
              0 Vote for this issue
              2 Start watching this issue


                  Bug DoR
                  Task DoD