Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-87056

IE malforms form data during AJAX requests

    Details

      Description

      IE's got a very odd bug where:

      • the form is enctype="multipart/form-data"
      • AND the form data is sent via AJAX/XMLHttpRequest/HXR
      • AND the form has either:
        • an input without a name
        • OR a checkbox input as the last input in the form, and is not checked

      The resulting Request FormData will be malformed.

      -----------------------------7e221b30c1284
      Content-Disposition: form-data; name="
      -----------------------------7e221b30c1284--

      To fix this issue requires a hack.

      Before the AJAX Request is sent, you append a bogus/extra input at the end of the form.

      It turns out, we were accidentally doing that, when we append the p_auth input to the form. When that feature is turned off, the hack is removed and the IE bug shows up.

      This issue is not reproducible/discovered in master but the underlying issue is still there and should be fixed.

      Steps to Reproduce:

      1. In portal-ext.properties, set auth.token.check.enabled=false
      2. Start server
      3. In IE11 open Portal
      4. Login
      5. Navigate to Documents and Media => [ + ] button => Folder
      6. Enter any name
      7. Click [ Save ]

      Expected Results:

      Browser forwards/navigates to Documents and Media root folder, with new folder created.

      Actual Results:

      • Browser does not forward/navigate and stays on the New Folder form.
      • Form displays confirmation message: "Your request completed successfully"
      • New folder is never created.
      • Tomcat errors:
      2018-10-31 21:46:36.001 WARN [http-nio-8080-exec-2][UploadServletRequestImpl:224] Unable to parse upload request: Stream ended unexpectedly

       

        Attachments

          Activity

            People

            • Assignee:
              raven.song Raven Song
              Reporter:
              byran.zaugg Byran Zaugg (Inactive)
              Participants of an Issue:
              Recent user:
              Csaba Turcsan
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                49 weeks, 1 day ago

                Packages

                Version Package
                7.0.0 DXP FP64
                7.0.X
                7.1.10 DXP FP4
                7.1.10.1 SP1
                7.1.2 CE GA3
                7.1.X
                Master