You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by mr...@apache.org on 2026/09/14 04:32:02 UTC
(ofbiz-framework) branch release24.09 updated: Fixed: Mini-lang to Groovy regressions in EmailServicesScript (OFBIZ-13581)
This is an automated email from the ASF dual-hosted git repository.
mridulpathak pushed a commit to branch release24.09
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git
The following commit(s) were added to refs/heads/release24.09 by this push:
new 2b9bde2ef5 Fixed: Mini-lang to Groovy regressions in EmailServicesScript (OFBIZ-13581)
2b9bde2ef5 is described below
commit 2b9bde2ef5efbe4fcff2c10a6c65fd9d202f9542
Author: Mridul Pathak <mr...@gmail.com>
AuthorDate: Mon Sep 14 00:29:51 2026 +0530
Fixed: Mini-lang to Groovy regressions in EmailServicesScript (OFBIZ-13581)
sendMailFromTemplateSetting filters parameters to sendMailFromScreen's own declared attributes via dctx.makeValidContext before merging into emailParams, instead of merging the entire raw parameters map. The conversion dropped the original minilang's set-service-fields step, which did exactly this filtering; restoring it removes the latent risk of an unrelated field (e.g. emailTemplateSettingId) leaking into a downstream service call, even though the framework's own dispatcher-level f [...]
---
.../groovy/org/apache/ofbiz/common/email/EmailServicesScript.groovy | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/framework/common/src/main/groovy/org/apache/ofbiz/common/email/EmailServicesScript.groovy b/framework/common/src/main/groovy/org/apache/ofbiz/common/email/EmailServicesScript.groovy
index 4fad1adcae..a08eaa6870 100644
--- a/framework/common/src/main/groovy/org/apache/ofbiz/common/email/EmailServicesScript.groovy
+++ b/framework/common/src/main/groovy/org/apache/ofbiz/common/email/EmailServicesScript.groovy
@@ -20,6 +20,7 @@ package org.apache.ofbiz.common.email
import org.apache.ofbiz.base.util.UtilProperties
import org.apache.ofbiz.entity.GenericValue
+import org.apache.ofbiz.service.ModelService
import org.apache.ofbiz.service.ServiceUtil
/**
@@ -64,7 +65,7 @@ Map sendMailFromTemplateSetting() {
emailParams.bodyParameters = bodyParameters
}
// copy the incoming parameter fields AFTER setting the ones from EmailTemplateSetting so they can override things like subject, sendFrom, etc
- emailParams << parameters
+ emailParams << dctx.makeValidContext('sendMailFromScreen', ModelService.IN_PARAM, parameters)
Map sendMailResult = run service: 'sendMailFromScreen', with: emailParams
if (!ServiceUtil.isSuccess(sendMailResult)) {
return sendMailResult