RocketChat / RocketChat/Rocket.Chat

[3.16.3] Set random password and send by mail not respecting password policy (number required)

Open
#22,866 3 comments 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:

If a password policy is enabled and enforces at least one number, not every generated password matches the policy.

Steps to reproduce:
  1. Enable PW policy with number required (default)
  2. Edit user and try to set random password
  3. ~33% chance that you get an error for not matching password policy
Expected behavior:

Always generate a valid password.

Actual behavior:

Sometimes fails.

Server Setup Information:
  • Version of Rocket.Chat Server: 3.16.3
  • Operating System: Ubuntu 18.04
  • Deployment Method: docker-compose
  • Number of Running Instances: 3
  • DB Replicaset Oplog: enabled
  • NodeJS Version: v12.22.1
  • MongoDB Version: 3.6.9 / wiredTiger (oplog Enabled)
Client Setup Information
  • Desktop App or Browser Version: Does not matter
  • Operating System:
Additional context
Relevant logs:

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 by reproducing the random-password flow with the number-required password policy enabled, as described in the issue, and trace where the generated password is validated. Done means the flow always produces a password satisfying the enabled policy and the failure no longer occurs.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
authentication, security
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 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.