RocketChat / RocketChat/Rocket.Chat

[BUG] 4.5.0 Can't find LDAP users to add in rooms

Open
#24,712 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
46.1k
Forks
13.9k
Avg merge
3d 3h
Merged PRs (30d)
130

Description

Description:

A fresh install , even the os, debian. After installing , I have managed to setup the LDAP auth, all good, users can loging, but in channels or rooms, when I try to add a new user, I cannot find him.
Same users who I can't find to add in a room, I can't add in all other rooms.
This bug applies only to several users, not to all of them.
When I try to write their CommonName or their username , the dropdown result from the search-box shows "empty" , meaning no result
Real example:
I have 30 users with cn(commonname) starting from A to Z, only letters.
When i go to a room-> add member-> search-box - it shows me the first 10 results , with the search-box empty, for example from name A to name M dropdown list, but after a search for a user whoose name starts with a letter after M, it shows empty as a result, even though the users exists.

Steps to reproduce:
  1. Follow all the installation steps from rocket.chat guide, nothing else
Expected behavior:

I would have expected to add all the users I want

Actual behavior:

Cannot find all LDAP users authenticated.

Server Setup Information:
  • Version of Rocket.Chat Server: 4.5.0
  • Operating System: Debian 10.4
  • Deployment Method: tar, npm i
  • Number of Running Instances: 1
  • DB Replicaset Oplog: -
  • NodeJS Version: 14.18
  • MongoDB Version: 5.0
Client Setup Information
  • Desktop App or Browser Version: both methods, same bug
  • Operating System: it doesn't matter the clients operating system
Relevant logs:

Lots of
{"level":50,"time":"2022-03-03T15:29:13.266Z","pid":1,"hostname":"f9c9770d540f","name":"","name":"LDAP","err":{"type":"Error","message":"User not found","stack":"Error: User not found\n at server/lib/ldap/Manager.ts:167:11\n at /app/bundle/programs/server/npm/node_modules/meteor/promise/node_modules/meteor-promise/fiber_pool.js:43:40"},"msg":"User not found"}

And "User not found" error when i try a LDAP search test on a 1st try, but the 2nd or 3rd is succesfull.

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 server/lib/ldap/Manager.ts:167 and inspect the LDAP search path associated with the reported "User not found" error. Reproduce the LDAP search and room-member lookup using the listed Rocket.Chat 4.5.0 setup, then verify that users beyond the initial results are returned and can be added to rooms without intermittent search failures.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
authentication, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.