[ofbiz-framework] branch release18.12 updated (3e22e45 -> d9e20d4)

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[ofbiz-framework] branch release18.12 updated (3e22e45 -> d9e20d4)

jleroux@apache.org
This is an automated email from the ASF dual-hosted git repository.

jleroux pushed a change to branch release18.12
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git.


    from 3e22e45  Documented: Adds the CSRF defense documentation (missed the add last time)
     new 711ca41  Fixed: Error in uploading very large files, ie >2MB
     new 51b2b62  Fixed: Error in uploading very large files, ie >2MB
     new d9e20d4  Improved: Ignores /upload

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../src/main/java/org/apache/ofbiz/webapp/control/RequestHandler.java | 4 ++++
 runtime/.gitignore                                                    | 1 +
 2 files changed, 5 insertions(+)

Reply | Threaded
Open this post in threaded view
|

[ofbiz-framework] 01/03: Fixed: Error in uploading very large files, ie >2MB

jleroux@apache.org
This is an automated email from the ASF dual-hosted git repository.

jleroux pushed a commit to branch release18.12
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git

commit 711ca4171547360b55ed182516a05db38674fddf
Author: Jacques Le Roux <[hidden email]>
AuthorDate: Thu Apr 16 15:46:09 2020 +0200

    Fixed: Error in uploading very large files, ie >2MB
   
    (OFBIZ-11534)
   
    There is an issue in uploading large files, I am able to upload files up to 2 GB
    successfully but getting an error when trying to upload a file larger than 2GB.
   
    Example -
    1. Go to party profile -
    https://demo-trunk.ofbiz.apache.org/partymgr/control/viewprofile?partyId=admin
    2. Try to create a party content with a file larger than 2 GB
    3. Error on console
   
    jleroux:
    For a 2GB+ file you need to set Xmx to more than the double of the file size,
    eg: gradlew ofbiz -PjvmArgs="-Xms1024M -Xmx5048M"
   
    You then get another small issue (only in log) when redirecting to send the
    partyId parameter.
   
    This is because, DiskFileItem is a temporary Object with a null value contained
    in "fileItems" attribute. It can't be detected by UtilMisc::makeMapSerializable
    and that makes "fileItems" not serializable. So it must be removed from
    reqAttrMap.
   
    Thanks: Chandan Khandelwal for report, Michael for suggesting a very large file
    to upload
---
 .../src/main/java/org/apache/ofbiz/webapp/control/RequestHandler.java | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/RequestHandler.java b/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/RequestHandler.java
index 41b5d44..3e9d24e 100644
--- a/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/RequestHandler.java
+++ b/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/RequestHandler.java
@@ -903,6 +903,10 @@ public class RequestHandler {
             }
         }
         if (reqAttrMap.size() > 0) {
+            // fileItems is not serializable.
+            // It contains a temporary DiskFileItem with a null value than can't be detected by UtilMisc::makeMapSerializable
+            // So it must be removed from reqAttrMap. See OFBIZ-11534
+            reqAttrMap.remove("fileItems");
             byte[] reqAttrMapBytes = UtilObject.getBytes(reqAttrMap);
             if (reqAttrMapBytes != null) {
                 req.getSession().setAttribute("_REQ_ATTR_MAP_", StringUtil.toHexString(reqAttrMapBytes));

Reply | Threaded
Open this post in threaded view
|

[ofbiz-framework] 02/03: Fixed: Error in uploading very large files, ie >2MB

jleroux@apache.org
In reply to this post by jleroux@apache.org
This is an automated email from the ASF dual-hosted git repository.

jleroux pushed a commit to branch release18.12
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git

commit 51b2b628aebe14ec20e6822cc0a2d8e0957cbdd8
Author: Jacques Le Roux <[hidden email]>
AuthorDate: Thu Apr 16 16:02:20 2020 +0200

    Fixed: Error in uploading very large files, ie >2MB
   
    (OFBIZ-11534)
   
    This was not supposed to be committed, actually (wrong) part of OFBIZ-11597

Reply | Threaded
Open this post in threaded view
|

[ofbiz-framework] 03/03: Improved: Ignores /upload

jleroux@apache.org
In reply to this post by jleroux@apache.org
This is an automated email from the ASF dual-hosted git repository.

jleroux pushed a commit to branch release18.12
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git

commit d9e20d4dab013f9900c186e0b91fa9fdede7122d
Author: Jacques Le Roux <[hidden email]>
AuthorDate: Thu Apr 16 16:11:34 2020 +0200

    Improved: Ignores /upload
---
 runtime/.gitignore | 1 +
 1 file changed, 1 insertion(+)

diff --git a/runtime/.gitignore b/runtime/.gitignore
index f4a9877..290c994 100644
--- a/runtime/.gitignore
+++ b/runtime/.gitignore
@@ -6,3 +6,4 @@
 /tmp
 /tempfiles
 /output
+/uploads/