You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ofbiz.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2026/09/15 08:02:00 UTC

[jira] [Commented] (OFBIZ-13592) updateContentPermission grants UPDATE via ancestor ownership without an ownership-change request

    [ https://issues.apache.org/jira/browse/OFBIZ-13592?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18115459#comment-18115459 ] 

ASF subversion and git services commented on OFBIZ-13592:
---------------------------------------------------------

Commit 72f5ae7dcd1a81099592a95ab53bc255c99cf04c in ofbiz-framework's branch refs/heads/trunk from Mridul Pathak
[ https://gitbox.apache.org/repos/asf?p=ofbiz-framework.git;h=72f5ae7dcd ]

Fixed: updateContentPermission grants UPDATE via ancestor ownership without an ownership change request (OFBIZ-13592)

The minilang-to-Groovy conversion of updateContentPermission moved the ancestor parent-walk block that checks ownership of a content's owner chain out of the conditional block that verifies an explicit ownership reassignment is being requested, making it run unconditionally whenever checkOwnership failed on the content's current owner. This let a user who owns any ancestor in the ownership chain update content they don't own and aren't reassigning ownership of, bypassing the intended permission check. The parent-walk is restored to its original nesting inside the ownerContentId reassignment check, matching the pre-conversion minilang behavior.


> updateContentPermission grants UPDATE via ancestor ownership without an ownership-change request
> ------------------------------------------------------------------------------------------------
>
>                 Key: OFBIZ-13592
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-13592
>             Project: OFBiz
>          Issue Type: Bug
>          Components: content
>    Affects Versions: Upcoming Branch, 24.09.07
>            Reporter: Mridul Pathak
>            Assignee: Mridul Pathak
>            Priority: Critical
>
> In {{updateContentPermission}}, the ownership parent-walk block (the {{while}} loop checking ancestor ownership) is nested as a sibling of the {{ownerContentId}} check instead of inside it. In the original minilang, the parent-walk was only reachable when {{ownerContentId}} was supplied, differed from the content's current owner, and a second ownership check also failed — i.e., only during an explicit ownership reassignment. As converted, the parent-walk instead fires whenever the direct ownership check on {{contentId}} fails, regardless of whether {{ownerContentId}} was ever supplied. A user who doesn't own a piece of content directly, and isn't requesting any ownership change, is now granted UPDATE permission if they own any ancestor in its ownership chain.
> Needs fixing: re-nest the ancestor parent-walk block inside the {{ownerContentId}}-supplied branch, matching the original minilang's condition structure.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)