Skip to content

fix(user_ldap): Do not map groups we do not know if they match filter - #45364

Merged
kesselb merged 1 commit into
masterfrom
fix/ldap-avoid-false-positive-mapping
Jan 27, 2025
Merged

fix(user_ldap): Do not map groups we do not know if they match filter#45364
kesselb merged 1 commit into
masterfrom
fix/ldap-avoid-false-positive-mapping

Conversation

@come-nc

@come-nccome-nc commented May 16, 2024

Copy link
Copy Markdown
Contributor

Summary

When nesting is enabled, filterValidGroups is supposed to check for each groups if it actually exist, because it may not be visible to Nextcloud. So in this codepath we disable automapping of groups.

That may mean in some cases we do not map a valid group, but it should get mapped sooner or later anyway.
I’m still pondering if this is the best solution.

  • Maybe only do that if nesting is enabled? Not clear to me yet if this is the only possible problematic case
  • Maybe only do that if $name is not null, as when it is null a search will be used to validate existence anyway.
  • If this last point is true, maybe we simply always pass null for $name? Or pass null for $name when nesting is enabled?

Checklist

@come-nccome-nc added this to the Nextcloud 30 milestone May 16, 2024
@come-nc
come-nc requested a review from blizzzMay 16, 2024 12:43
@come-nccome-nc self-assigned this May 16, 2024
@come-nc
come-nc marked this pull request as draft May 16, 2024 12:43
@come-nc
come-ncforce-pushed the fix/ldap-avoid-false-positive-mapping branch from 64c97b4 to 647a79aCompareJanuary 27, 2025 11:39
When nesting is enabled, filterValidGroups is supposed to check for each
groups if it actually exist, because it may not be visible to
Nextcloud. So in this codepath we disable automapping of groups.
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
@come-nc
come-ncforce-pushed the fix/ldap-avoid-false-positive-mapping branch from 647a79a to de77415CompareJanuary 27, 2025 13:51
@come-nc
come-nc marked this pull request as ready for review January 27, 2025 13:52
@come-nccome-nc added 3. to review Waiting for reviews and removed 2. developing Work in progress labels Jan 27, 2025
@come-nc

Copy link
Copy Markdown
ContributorAuthor

/backport to stable31

@come-nc

Copy link
Copy Markdown
ContributorAuthor

/backport to stable30

@come-nc

Copy link
Copy Markdown
ContributorAuthor

/backport to stable29

@come-nc
come-nc requested a review from artongeJanuary 27, 2025 15:11
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to reviewWaiting for reviewsfeature: ldap

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@come-nc@artonge@provokateurin@kesselb@skjnldsv