Skip to content

Prevent circular ACL parent relationships - #19557

Open
yashdotdev13 wants to merge 1 commit into
spring-projects:mainfrom
yashdotdev13:fix/19513-acl-parent-cycle
Open

Prevent circular ACL parent relationships#19557
yashdotdev13 wants to merge 1 commit into
spring-projects:mainfrom
yashdotdev13:fix/19513-acl-parent-cycle

Conversation

@yashdotdev13

Copy link
Copy Markdown

Closes #19513

This change prevents circular parent relationships from being created
when configuring ACL hierarchies.

Previously, AclImpl#setParent only prevented an ACL from being
assigned itself as its parent. This allowed indirect circular
relationships to be created.

The implementation now walks the existing parent hierarchy and rejects
a relationship when the current ACL instance is encountered.

Tests were added for both direct and indirect circular parent
relationships.

Existing parent-changing behavior is also covered by the existing test
suite.

Tests:

  • ./gradlew :spring-security-acl:test

Signed-off-by: 98001yash <yashchauhan.gaya@gmail.com>
@yashdotdev13
yashdotdev13 force-pushed the fix/19513-acl-parent-cycle branch from 91de514 to 67b8b20 Compare August 17, 2026 21:58
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Aug 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status: waiting-for-triage An issue we've not yet triaged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ACL parent cycle causes infinite recursion in BasicLookupStrategy.convert()

2 participants