Skip to content

feat(password): enhance password complexity requirements and validation - #1717

Merged
JohnVillalovos merged 2 commits into
LibreBooking:developfrom
lucs7:feat/password
Sep 21, 2026
Merged

JohnVillalovos merged 2 commits into
LibreBooking:developfrom
lucs7:feat/password

Conversation

@lucs7

@lucs7 lucs7 commented Sep 20, 2026

Copy link
Copy Markdown
Collaborator
  • strengthens the application's password complexity requirements and updates related configuration
  • include a minimum number of special characters,
  • require both upper and lower case letters, and raise the minimum numbers and letters.

Copilot AI lite review requested due to automatic review settings September 20, 2026 15:27

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

The validator incorrectly counts special characters as digits, and the environment value 0 cannot disable the requirement.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 1 High severity

Open (1)
What changed in this PR

This PR strengthens password complexity requirements, adds configurable special-character validation, and updates related tests, configuration, and translations.

Changes:

  • Raises minimum letter and number requirements and requires mixed case.
  • Adds configurable special-character requirements.
  • Updates configuration examples, tests, and localized messages.
File Review summary
tests/​Infrastructure/​Config/​ConfigTest.php Updates the minimum-letter expectation.
tests/​Common/​Validators/​PasswordComplexityValidatorTest.php Adds special-character tests. Nit (1 vote): add coverage for digit and letter thresholds.
lib/​Config/​ConfigKeys.php Defines stronger password defaults and the special-character setting.
lib/​Common/​Validators/​PasswordComplexityValidator.php Applies the expanded password rules. Critical (3 votes): special characters are counted as numbers; digit counting should use [0-9].
lang/​it_it.php Updates Italian password messages.
lang/​fr_fr.php Updates French password messages.
lang/​es.php Updates Spanish password messages.
lang/​en_us.php Updates English password messages.
lang/​de_de.php Updates German password messages.
config/​config.dist.php Updates distributed password settings. Nit (1 vote): documentation still lists old defaults and omits the special-character setting.
.env.example Documents environment settings. Moderate (1 vote): the value 0 cannot disable the requirement because it is treated as empty.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread lib/Common/Validators/PasswordComplexityValidator.php Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Unresolved validation, configuration, localization, and documentation issues remain.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 3 Medium severity

Open (3)
Resolved since last review (1)

Comment thread .env.example
Comment thread lib/Common/Validators/PasswordComplexityValidator.php Outdated
Comment thread lib/Common/Validators/PasswordComplexityValidator.php Outdated
Comment thread tests/Common/Validators/PasswordComplexityValidatorTest.php Outdated
@lucs7
lucs7 force-pushed the feat/password branch 2 times, most recently from 676974d to ac6fcb2 Compare September 21, 2026 08:40
BREAKING CHANGE:  config.php 'password.minimum letters' has been
renamed to 'password.minimum length'

@JohnVillalovos JohnVillalovos left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Thanks @lucs7

@JohnVillalovos
JohnVillalovos enabled auto-merge (rebase) September 21, 2026 15:17
@JohnVillalovos
JohnVillalovos merged commit c811eb1 into LibreBooking:develop Sep 21, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants