Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-29626

Fix webengine multipart form fields retrieval when uploading files

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 11.2
    • Fix Version/s: 10.10-HF45, 11.3, 2021.0
    • Component/s: WebEngine

      Description

      Api at FormData#getFormFields is buggy when the form contains binary data:

      java.lang.NullPointerException: null
      	at java.lang.String.<init>(String.java:537) ~[?:?]
      	at org.apache.commons.fileupload.disk.DiskFileItem.getString(DiskFileItem.java:338) ~[commons-fileupload-1.4.jar:1.4]
      	at org.nuxeo.ecm.webengine.forms.FormData.getString(FormData.java:108) ~[nuxeo-webengine-core-11.3-SNAPSHOT.jar:?]
      	at org.nuxeo.ecm.webengine.forms.FormData.getMultiPartFormFields(FormData.java:150) ~[nuxeo-webengine-core-11.3-SNAPSHOT.jar:?]
      	at org.nuxeo.ecm.webengine.forms.FormData.getFormFields(FormData.java:137) ~[nuxeo-webengine-core-11.3-SNAPSHOT.jar:?]
      	at org.nuxeo.apidoc.browse.Distribution.uploadDistrib(Distribution.java:499) ~[nuxeo-apidoc-webengine-20.0.0-SNAPSHOT.jar:?]
      

      --> assume form fields api should not decode binary content, and skip items that are not marked as form fields.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 4 hours, 30 minutes
                  4h 30m