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/02/15 13:11:51 UTC
[ofbiz-framework] branch trunk updated: Improved: no functional change, adds a logerror in ProgramExport.groovy
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 887515b Improved: no functional change, adds a logerror in ProgramExport.groovy
887515b is described below
commit 887515beef4c28ecf80b323c455d9d974f47ac84
Author: Jacques Le Roux <ja...@les7arts.com>
AuthorDate: Tue Feb 15 14:11:33 2022 +0100
Improved: no functional change, adds a logerror in ProgramExport.groovy
For a reason I did not find, this morning I did not receive any error message in
UI when the Groovy Program content was rejected for security reason.
So I added a logerror message to be sure something will be reported in case
this issue popup again.
BTW I switched to 22.01 branch and it was OK, then back to trunk it was OK again,
weird :/
---
framework/webtools/groovyScripts/entity/ProgramExport.groovy | 1 +
1 file changed, 1 insertion(+)
diff --git a/framework/webtools/groovyScripts/entity/ProgramExport.groovy b/framework/webtools/groovyScripts/entity/ProgramExport.groovy
index 52a7a03..639b82d 100644
--- a/framework/webtools/groovyScripts/entity/ProgramExport.groovy
+++ b/framework/webtools/groovyScripts/entity/ProgramExport.groovy
@@ -79,6 +79,7 @@ if (groovyProgram) {
try {
// Check if a webshell is not uploaded but allow "import"
if (!org.apache.ofbiz.security.SecuredUpload.isValidText(groovyProgram,["import"])) {
+ logError("================== Not executed for security reason ==================")
request.setAttribute("_ERROR_MESSAGE_", "Not executed for security reason")
return
}