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 26dda5d875 Fixed: checkContentOperationSecurity crashes when content 
has a purpose assigned (OFBIZ-13535)
26dda5d875 is described below

commit 26dda5d875f9a8937f5fbba1fac216c7dc8aaf63
Author: Mridul Pathak <[email protected]>
AuthorDate: Mon Sep 7 16:36:23 2026 +0530

    Fixed: checkContentOperationSecurity crashes when content has a purpose 
assigned (OFBIZ-13535)
    
    - Fixed operations << currentOperations nesting a sub-list instead of 
flattening it, which made the operations loop crash with 
MissingPropertyException on any content with a ContentPurpose assigned
    - Fixed findAllContentPurposes's declared return type (Map, should never 
have been narrowed from def) crashing with GroovyCastException for the same 
trigger condition, earlier in the same call chain, before the bug above could 
even be reached
---
 .../apache/ofbiz/content/permission/ContentPermissionServices.groovy  | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/applications/content/src/main/groovy/org/apache/ofbiz/content/permission/ContentPermissionServices.groovy
 
b/applications/content/src/main/groovy/org/apache/ofbiz/content/permission/ContentPermissionServices.groovy
index d0d710ab80..6934bd65aa 100644
--- 
a/applications/content/src/main/groovy/org/apache/ofbiz/content/permission/ContentPermissionServices.groovy
+++ 
b/applications/content/src/main/groovy/org/apache/ofbiz/content/permission/ContentPermissionServices.groovy
@@ -353,7 +353,7 @@ Map checkContentOperationSecurity(String 
contentOperationId, String contentPurpo
                         .orderBy('contentPurposeTypeId')
                         .cache()
                         .queryList()
-                operations << currentOperations
+                operations.addAll(currentOperations)
             }
         } else {
             operations = from('ContentPurposeOperation')
@@ -531,7 +531,7 @@ Map checkRoleSecurity(String roleEntity, String 
roleEntityField, String checkId,
 /**
  * Find all content purposes for the specified content
  */
-Map findAllContentPurposes(String checkId) {
+Object findAllContentPurposes(String checkId) {
     if (!checkId) {
         return error(label('ContentUiLabels', 'ContentRequiredField', 
[requiredField: 'checkId']))
     }

Reply via email to