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

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


The following commit(s) were added to refs/heads/release22.01 by this push:
     new 29bdb0ed86 Improved: Unable to upload a file through ecommerce 
(OFBIZ-12636)
29bdb0ed86 is described below

commit 29bdb0ed86aee0d20987b05fbdfdccc0f9377c83
Author: Jacques Le Roux <jacques.le.r...@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)

Reply via email to