Uploaded image for project: 'Struts 2'
  1. Struts 2
  2. WW-4726

MaxMultiPartUpload limited to 2GB (Long --> Integer)

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.5.8
    • Fix Version/s: 2.5.10
    • Component/s: Core, Dispatch Filter
    • Labels:
      None

      Description

      In the following commit, the org.apache.struts2.dispatcher.multipart.AbstractMultiPartRequest.setMaxSize was changed from being a Long to being an Integer. The maxMultiPartSize was calculated in Bytes and thus, by changing the format, it limits the maximum from over 9EB(exabytes) to just around 2GB.

      Worse, the default value appears to have been left probably as Long.MAX_SIZE which means that if no value is provided then you get a NumberFormatException thrown.

      https://git-wip-us.apache.org/repos/asf/struts/repo?p=struts.git;a=commitdiff;h=4de8309d0aebb75d409119f2d4a6d06491dda2b4

        Activity

        Hide
        hudson Hudson added a comment -

        SUCCESS: Integrated in Jenkins build Struts-JDK7-master #573 (See https://builds.apache.org/job/Struts-JDK7-master/573/)
        WW-4726 Fixes wrong value type used to limit upload (lukaszlenart: rev f78d90ee22eed1e898cebefa4565687919b09c30)

        • (edit) core/src/main/java/org/apache/struts2/dispatcher/multipart/AbstractMultiPartRequest.java
        • (edit) plugins/pell-multipart/src/main/java/org/apache/struts2/dispatcher/multipart/PellMultiPartRequest.java
        Show
        hudson Hudson added a comment - SUCCESS: Integrated in Jenkins build Struts-JDK7-master #573 (See https://builds.apache.org/job/Struts-JDK7-master/573/ ) WW-4726 Fixes wrong value type used to limit upload (lukaszlenart: rev f78d90ee22eed1e898cebefa4565687919b09c30) (edit) core/src/main/java/org/apache/struts2/dispatcher/multipart/AbstractMultiPartRequest.java (edit) plugins/pell-multipart/src/main/java/org/apache/struts2/dispatcher/multipart/PellMultiPartRequest.java
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit f78d90ee22eed1e898cebefa4565687919b09c30 in struts's branch refs/heads/master from Lukasz Lenart
        [ https://git-wip-us.apache.org/repos/asf?p=struts.git;h=f78d90e ]

        WW-4726 Fixes wrong value type used to limit upload

        Show
        jira-bot ASF subversion and git services added a comment - Commit f78d90ee22eed1e898cebefa4565687919b09c30 in struts's branch refs/heads/master from Lukasz Lenart [ https://git-wip-us.apache.org/repos/asf?p=struts.git;h=f78d90e ] WW-4726 Fixes wrong value type used to limit upload
        Hide
        lukaszlenart Lukasz Lenart added a comment -

        Yeah, you're right, my mistake Fix is under way

        Show
        lukaszlenart Lukasz Lenart added a comment - Yeah, you're right, my mistake Fix is under way
        Hide
        abrin adam brin added a comment -

        thanks. This is a blocker for us for deploying any new version of our app as we regularly get uploads > 2GB. The change seems to try and unify the normal multi-part handler with the pell-multipart-plugin which uses http.utils.multipartrequest.ServletMultipartRequest and requires an int. I'd create a pull request, but I'm not familiar with this plugin or the overall implications.

        Show
        abrin adam brin added a comment - thanks. This is a blocker for us for deploying any new version of our app as we regularly get uploads > 2GB. The change seems to try and unify the normal multi-part handler with the pell-multipart-plugin which uses http.utils.multipartrequest.ServletMultipartRequest and requires an int. I'd create a pull request, but I'm not familiar with this plugin or the overall implications.

          People

          • Assignee:
            lukaszlenart Lukasz Lenart
            Reporter:
            abrin adam brin
          • Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development