You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "Angela Schreiber (Jira)" <ji...@apache.org> on 2020/03/17 14:42:00 UTC
[jira] [Updated] (OAK-8949) PrincipalRestrictionProvider does not
filter rep:nodePath restriction
[ https://issues.apache.org/jira/browse/OAK-8949?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Angela Schreiber updated OAK-8949:
----------------------------------
Summary: PrincipalRestrictionProvider does not filter rep:nodePath restriction (was: Senseless code in PrincipalRestrictionProvider)
> PrincipalRestrictionProvider does not filter rep:nodePath restriction
> ---------------------------------------------------------------------
>
> Key: OAK-8949
> URL: https://issues.apache.org/jira/browse/OAK-8949
> Project: Jackrabbit Oak
> Issue Type: Bug
> Components: core, security
> Affects Versions: 1.20.0
> Reporter: Lars Grefer
> Assignee: Angela Schreiber
> Priority: Minor
> Fix For: 1.26.0
>
>
> {{org.apache.jackrabbit.oak.security.authorization.restriction.PrincipalRestrictionProvider#writeRestrictions}} sems too contain useless code right here:
> [https://github.com/apache/jackrabbit-oak/blob/e1ababdc2db085a3e73413382262e8adcec716f3/oak-core/src/main/java/org/apache/jackrabbit/oak/security/authorization/restriction/PrincipalRestrictionProvider.java#L100]
> The {{restrictions}} set is copied to a new HashSet and then some elements are removed from the new set. After that, the new set seems to be never used again.
> -The change was introduced by OAK-7944. Before that, the elements were removed from the {{restrictions}} set itself and not from the copy.-
> Update:
> OAK-7944 only changed the Iteration-Logic, the creation of the new, temporary set was acutally introduced in OAK-758: https://github.com/apache/jackrabbit-oak/commit/645533f1db898b2e9332385cf50ee3feae0da5ce#diff-45fef5680c5074709fba3b2187330e60R86
--
This message was sent by Atlassian Jira
(v8.3.4#803005)