[Bug]: LDAP-Search not working
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 36.9k
- Forks
- 5.2k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 713
Description
⚠️ This issue respects the following points: ⚠️
- This is a bug, not a question or a configuration/webserver/proxy issue.
- This issue is not already reported on Github OR Nextcloud Community Forum (I've searched it).
- Nextcloud Server is up to date. See Maintenance and Release Schedule for supported versions.
- I agree to follow Nextcloud's Code of Conduct.
Bug description
Dear Nextcloud team,
since the update to version 27, the search of users in the share dialog does not work anymore. Only local users are found. Users from LDAP are not found.
LLDAP is used as LDAP server.
Only this entry can be found in the Nextcloud log:
ldap_search(): Search: Other (e.g., implementation specific) error at /var/www/html/apps/user_ldap/lib/LDAP.php#307
LLDAP Log:
[error]: | Database error: Query Error: error returned from database: column reference "display_name" is ambiguous.
Steps to reproduce
Expected behavior
Users from the LDAP backend are found.
Installation method
Official All-in-One appliance
Nextcloud Server version
27
Operating system
Other
PHP engine version
PHP 8.2
Web server
Apache (supported)
Database engine version
PostgreSQL
Is this bug present after an update or on a fresh install?
Upgraded to a MAJOR version (ex. 22 to 23)
Are you using the Nextcloud Server Encryption module?
Encryption is Disabled
What user-backends are you using?
- Default user-backend (database)
- LDAP/ Active Directory
- SSO - SAML
- Other
Configuration report
No response
List of activated Apps
No response
Nextcloud Signing status
No response
Nextcloud Logs
No response
Additional info
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at apps/user_ldap/lib/LDAP.php#307 and inspect the LDAP search that produces the reported error; compare it with the LLDAP log showing ambiguous display_name. Reproduce the share-dialog LDAP user search on Nextcloud 27 with LLDAP and PostgreSQL, then confirm LDAP-backed users are returned without the database error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php, postgresql
- Domain
- authentication, databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100