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

_walk_group_ancestry() from LdapFluff::ActiveDirectory::MemberService can recurse in an infinite loop #51

Open
elatt opened this issue Mar 23, 2016 · 0 comments

Comments

@elatt
Copy link

elatt commented Mar 23, 2016

It seems that our IT admins have created a cyclic group membership (where Group A has Group B as a member but Group B also has Group A as a member). While I doubt this type of configuration advised, it seems it is legal so I think _walk_group_ancestry() should have some sort of cycle detection otherwise it eventually blows up the stack and raises an exception. I propose that the function should be made tail-recursive by rather than returning a list, it should take a last and use that to accumulate data. Then I think we can check to see if the current group we are processing already exists inside our accumulated list of groups and if it does we know that we are starting to cycle and we can break out.

c-silva added a commit to c-silva/ldap_fluff that referenced this issue Jun 6, 2016
c-silva added a commit to c-silva/ldap_fluff that referenced this issue Jun 7, 2016
…es to solve issue already reported:

theforeman#51

Fix _walk_group_ancestry method declaration with extra variable
Refer unused variable with _
Lineup equals signs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant