[GH-ISSUE #401] Password Complexity Check Capability #227

Closed
opened 2026-02-22 18:18:25 -05:00 by yindo · 1 comment
Owner

Originally created by @pritchey on GitHub (Nov 29, 2023).
Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/401

This pull request add more sophisticated password checking capability. Many organizations have requirements/audits/etc. that require specific password complexities to be used (length, upper/lower case, numbers and special characters). This pull request does the following to the 'server' portion of the code:

  1. Requires the "joi" and "joi-password-complexity" npm packages. The joi-password-complexity package provides the complexity check via a simple API and user configurable specification.
  2. Adds a user configuration section to the .env.example configuration file at the bottom where the user can adjust the settings to meet their requirements. These are commented out by default, and the current default mimics the current 8 character length requirement.
  3. Adds calls to a password complexity check function in the server/models/user.js file to the 'create' and 'update' model calls. The added function includes default complexity settings mimicking the current default, however it will automatically override those defaults with those specified by the user in their .env/.env.developer file.
  4. In the event the password entered does not meet the requirements, the current error display capability included in the user dialog is used to display the requirements that were not met.

Pull request is #402

Originally created by @pritchey on GitHub (Nov 29, 2023). Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/401 This pull request add more sophisticated password checking capability. Many organizations have requirements/audits/etc. that require specific password complexities to be used (length, upper/lower case, numbers and special characters). This pull request does the following to the 'server' portion of the code: 1. Requires the "joi" and "joi-password-complexity" npm packages. The joi-password-complexity package provides the complexity check via a simple API and user configurable specification. 2. Adds a user configuration section to the .env.example configuration file at the bottom where the user can adjust the settings to meet their requirements. These are commented out by default, and the current default mimics the current 8 character length requirement. 3. Adds calls to a password complexity check function in the server/models/user.js file to the 'create' and 'update' model calls. The added function includes default complexity settings mimicking the current default, however it will automatically override those defaults with those specified by the user in their .env/.env.developer file. 4. In the event the password entered does not meet the requirements, the current error display capability included in the user dialog is used to display the requirements that were not met. Pull request is #402
yindo added the enhancementfeature request labels 2026-02-22 18:18:25 -05:00
yindo closed this issue 2026-02-22 18:18:25 -05:00
Author
Owner

@timothycarambat commented on GitHub (Dec 5, 2023):

resolved by #402

@timothycarambat commented on GitHub (Dec 5, 2023): resolved by #402
yindo changed title from Password Complexity Check Capability to [GH-ISSUE #401] Password Complexity Check Capability 2026-06-05 14:34:10 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mintplex-Labs/anything-llm#227