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

commit 6cb9b12df1fd9d9beb5c182403a3c39307ef188e
Author: Jacques Le Roux <jacques.le.r...@les7arts.com>
AuthorDate: Wed Feb 23 09:31:25 2022 +0100

    Fixed: Trivial change in ProgramExport.groovy, uses the SecuredUpload import
    
    No Functional change
---
 framework/webtools/groovyScripts/entity/ProgramExport.groovy | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/framework/webtools/groovyScripts/entity/ProgramExport.groovy 
b/framework/webtools/groovyScripts/entity/ProgramExport.groovy
index 639b82d..47923d4 100644
--- a/framework/webtools/groovyScripts/entity/ProgramExport.groovy
+++ b/framework/webtools/groovyScripts/entity/ProgramExport.groovy
@@ -17,6 +17,7 @@
  * under the License.
  */
 import org.apache.ofbiz.entity.GenericValue
+import org.apache.ofbiz.security.SecuredUpload
 import org.codehaus.groovy.control.CompilerConfiguration
 import org.codehaus.groovy.control.MultipleCompilationErrorsException
 import org.codehaus.groovy.control.customizers.ImportCustomizer
@@ -78,7 +79,7 @@ def shell = new GroovyShell(loader, binding, configuration)
 if (groovyProgram) {
     try {
         // Check if a webshell is not uploaded but allow "import"
-        if 
(!org.apache.ofbiz.security.SecuredUpload.isValidText(groovyProgram,["import"]))
 {
+        if (!SecuredUpload.isValidText(groovyProgram, ["import"])) {
             logError("================== Not executed for security reason 
==================")
             request.setAttribute("_ERROR_MESSAGE_", "Not executed for security 
reason")
             return

Reply via email to