owncloud / owncloud/ocis

Users service creates invalid LDAP filter when listing all users.

Open
#5,142 3 comments 0 reactions 0 assignees View on GitHub
Type:Bug
Dominant language
Go
Stars
2.1k
Forks
274
Avg merge
2d 1h
Merged PRs (30d)
103

Description

This is happening when using an external IDP / external LDAP configuration (setup with our helm chart). Trying to list all users in the user-management (e.g. to assign roles) results in invalid LDAP filters.

> > > These two queries seems to be problematic and are finding 0 result:
> > > ```
> > > openldap | 63775677 conn=1615 op=19228 SRCH base="ou=people,dc=example,dc=com" scope=2 deref=0 filter="(&(objectClass=inetOrgPerson)(|(?=undefined)(?=undefined)(?=undefined)(?uid=)))"
> > > openldap | 63775677 conn=1615 op=19228 SRCH attr=uid uid mail cn uidNumber gidNumber
> > > openldap | 63775677 conn=1615 op=19228 SEARCH RESULT tag=101 err=0 nentries=0 text=
> > >
> > > openldap | 63775677 conn=1616 op=8 SRCH base="ou=groups,dc=example,dc=com" scope=2 deref=0 filter="(&(objectClass=groupOfNames)(|(?=undefined)(?=undefined)(?=undefined)(?cn=)))"
> > > openldap | 63775677 conn=1616 op=8 SRCH attr=description cn mail cn gidNumber
> > > openldap | 63775677 conn=1616 op=8 SEARCH RESULT tag=101 err=0 nentries=0 text=
> > > ```
>
> This is indeed weird. Looks a bit like a mis-configuration, but it might also be an issue with the helm charts. I need to take a deeper look.

@NexZhu I was able to reproduce the problem. It seems to be caused by a bug in the user provider, which constructs a broken LDAP filter under certain circumstances. I'll open a new issue for this with some background and a possible workaround.

_Originally posted by @rhafer in https://github.com/owncloud/ocis/issues/5045#issuecomment-1329370022_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.