You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by jl...@apache.org on 2022/06/16 15:44:52 UTC

[ofbiz-framework] branch trunk updated: Improved: Unable to upload a file through ecommerce (OFBIZ-12636)

This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/trunk by this push:
     new 84d30a5abc Improved: Unable to upload a file through ecommerce (OFBIZ-12636)
84d30a5abc is described below

commit 84d30a5abce17ab0803aa62af79654d3b84b2323
Author: Jacques Le Roux <ja...@les7arts.com>
AuthorDate: Thu Jun 16 17:43:49 2022 +0200

    Improved: Unable to upload a file through ecommerce (OFBIZ-12636)
    
    Allows to check for only CSV files. This is not used OOTB in OFBiz.
    
    Thanks: Sachin for report and confirmation it's OK
---
 .../src/main/java/org/apache/ofbiz/security/SecuredUpload.java       | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/framework/security/src/main/java/org/apache/ofbiz/security/SecuredUpload.java b/framework/security/src/main/java/org/apache/ofbiz/security/SecuredUpload.java
index de36530c70..52fd639818 100644
--- a/framework/security/src/main/java/org/apache/ofbiz/security/SecuredUpload.java
+++ b/framework/security/src/main/java/org/apache/ofbiz/security/SecuredUpload.java
@@ -265,6 +265,11 @@ public class SecuredUpload {
                 return true;
             }
             break;
+        case "CSV":
+            if (isValidCsvFile(fileToCheck)) {
+                return true;
+            }
+            break;
 
         default: // All
             if (isValidTextFile(fileToCheck, true)