Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix detecting cyclic group memberships #25757

Merged
merged 1 commit into from
Mar 1, 2021

Conversation

blizzz
Copy link
Member

@blizzz blizzz commented Feb 22, 2021

When there is a cyclic group membership of groups (AD, Samba4), this was not being detected as not all information was taken into account, resulting in an infinite loop.

To reproduce:

  1. In AD/Samba4 have three groups Group A, Group B and Group C.
  2. Group B is member of Group A, Group C is member of Group B and Group A is member of Group C.
  3. LDAP settings Nested groups are enabled and hasMemberOfFilterSupport is disabled.
  4. php occ group:list

@blizzz blizzz added this to the Nextcloud 22 milestone Feb 22, 2021
@blizzz blizzz added the 2. developing Work in progress label Feb 23, 2021
@blizzz blizzz force-pushed the fix/noid/ldap-cyclic-group-memberships branch from 70943b7 to 4d33449 Compare February 23, 2021 21:50
@blizzz blizzz added 3. to review Waiting for reviews and removed 2. developing Work in progress labels Feb 23, 2021
@blizzz
Copy link
Member Author

blizzz commented Feb 26, 2021

/backport to stable21

@blizzz
Copy link
Member Author

blizzz commented Feb 26, 2021

/backport to stable20

@blizzz
Copy link
Member Author

blizzz commented Feb 26, 2021

/backport to stable19

Copy link
Member

@ChristophWurst ChristophWurst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know some of these words

@awaw9
Copy link

awaw9 commented Feb 26, 2021 via email

@tofuSCHNITZEL
Copy link
Contributor

tofuSCHNITZEL commented Feb 27, 2021

LGTM.
while checking the code and testing it with my local setup I found a rather small and simple addition to make the nested groups work with non DN group member attribute groups. you can check it out here:
tofuSCHNITZEL@5bf4fea
if it makes sense we could include it also here since its a rather small fix. (I tested it with my zimbra ldap - but I guess it should be tested with another ldap that uses eg uid as a member attribute as well.)

@blizzz
Copy link
Member Author

blizzz commented Mar 1, 2021

LGTM.
while checking the code and testing it with my local setup I found a rather small and simple addition to make the nested groups work with non DN group member attribute groups. you can check it out here:
tofuSCHNITZEL@5bf4fea
if it makes sense we could include it also here since its a rather small fix. (I tested it with my zimbra ldap - but I guess it should be tested with another ldap that uses eg uid as a member attribute as well.)

Nice one. I am happy to take it, but prefer it in a follow up PR for issue separation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants