RocketChat / RocketChat/Rocket.Chat

Email verification is reset at every login with ldap

Open
#20,828 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:

In my setup "E-Mail verification" is globally disabled.
Every time a ldap user logs in to Rocket.Chat the email verified state is set to "false".
No notifying mails are send because the user has no verified mail address.

If i create a local user everything works as expected.

Steps to reproduce:
  1. Create an LDAP connection
  2. Disable email verification
  3. set User mail address to "verified"
  4. login with this user account
Expected behavior:

User has a verified mail address and gets mail notifications.

Actual behavior:

User has a valid mail address.

Server Setup Information:
  • Version of Rocket.Chat Server: 3.10.3
  • Operating System: Debian 10
  • Deployment Method: tar
  • Number of Running Instances: 1
  • NodeJS Version: v12.20.0
  • MongoDB Version: 4.2.11
Client Setup Information
  • Desktop App or Browser Version: Any
  • Operating System: Any
Additional context
Relevant logs:

before login:
image
after login:
image

Server logs:
Feb 19 14:48:44 hostname rocketchat[25300]: LDAPHandler ➔ info Querying user
Feb 19 14:48:44 hostname rocketchat[25300]: LDAPHandler ➔ debug userQuery { 'services.ldap.id': 'hidden' }
Feb 19 14:48:44 hostname rocketchat[25300]: LDAPHandler ➔ info Logging user
Feb 19 14:48:44 hostname rocketchat[25300]: LDAPSync ➔ info Syncing user data
Feb 19 14:48:44 hostname rocketchat[25300]: LDAPSync ➔ debug user { email: undefined, _id: 'hidden' }
Feb 19 14:48:44 hostname rocketchat[25300]: LDAPSync ➔ debug ldapUser undefined
Feb 19 14:48:44 hostname rocketchat[25300]: LDAPSync ➔ debug not syncing user roles
Feb 19 14:48:44 hostname rocketchat[25300]: LDAPSync ➔ debug not syncing groups to channels
Feb 19 14:48:44 hostname rocketchat[25300]: LDAPSync ➔ debug setting {
Feb 19 14:48:44 hostname rocketchat[25300]: "emails": [
Feb 19 14:48:44 hostname rocketchat[25300]: {
Feb 19 14:48:44 hostname rocketchat[25300]: "address": "Martin@hidden",
Feb 19 14:48:44 hostname rocketchat[25300]: "verified": false
Feb 19 14:48:44 hostname rocketchat[25300]: }
Feb 19 14:48:44 hostname rocketchat[25300]: ]
Feb 19 14:48:44 hostname rocketchat[25300]: }

Kind regards

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 with the LDAPHandler login flow and the LDAPSync user-data synchronization shown in the logs, reproducing the issue with email verification disabled and a pre-verified LDAP user. Done means the user's email remains verified after login and notification emails are not suppressed because synchronization resets the verification state.

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.