nextcloud / nextcloud/server

[Bug]: LDAP-Search not working

Open
#41,047 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

0. Needs triage 27-feedback bug feature: ldap feature: sharing
Dominant language
PHP
Stars
36.9k
Forks
5.2k
Avg merge
2d 3h
Merged PRs (30d)
713

Description

⚠️ This issue respects the following points: ⚠️
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.