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

ldap: Fix binary UUID handling in GetUserGroups #3767

Merged
merged 1 commit into from
Apr 4, 2023

Conversation

rhafer
Copy link
Contributor

@rhafer rhafer commented Apr 3, 2023

The LDAP backend for the users service didn't correctly decode binary UUIDs when looking up a user's group memberships.

Copy link
Contributor

@kobergj kobergj left a comment

Choose a reason for hiding this comment

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

Small suggestion because I hate elses 😄 But definitely not critical.

Comment on lines 364 to 367
if value, err := uuid.FromBytes(raw); err == nil {
groupID = value.String()
} else {
return nil, err
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
if value, err := uuid.FromBytes(raw); err == nil {
groupID = value.String()
} else {
return nil, err
}
value, err := uuid.FromBytes(raw)
if err != nil {
return nil, err
}
groupID = value.String()

The LDAP backend for the users service didn't correctly decode binary
UUIDs when looking up a user's group memberships.
@rhafer rhafer merged commit 7c1af1e into cs3org:edge Apr 4, 2023
@micbar micbar mentioned this pull request May 3, 2023
89 tasks
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

Successfully merging this pull request may close these issues.

2 participants