Skip to content

feat: More password requirements (M2-10505) - #2036

Merged
divbzero merged 22 commits into
developfrom
M2-10505-password-requirements
Apr 10, 2026
Merged

feat: More password requirements (M2-10505)#2036
divbzero merged 22 commits into
developfrom
M2-10505-password-requirements

Conversation

@divbzero

@divbzero divbzero commented Apr 9, 2026

Copy link
Copy Markdown
Contributor
  • Tests for the changes have been added

📝 Description

🔗 Jira Ticket M2-10505

Changes include:

  • NFKC normalize password first
  • Disallow all unicode whitespace
  • Increase minimum length to 10 grapheme clusters
  • Require at least 3 character types of uppercase, lowercase, caseless, number, and symbol

Related to:

@divbzero

divbzero commented Apr 9, 2026

Copy link
Copy Markdown
Contributor Author

Pushing this for review first. Still need to make a small update to the uppercase/lowercase logic to allow caseless Arabic or CJK characters.

adeiji
adeiji approved these changes Apr 10, 2026

@adeiji adeiji 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.

Didn't mean to approve, just wanted to leave a comment, so submitting another review.

Comment thread src/apps/users/password_validation.py Outdated
Previously an indirect dependency via fastapi-mail.
@divbzero
divbzero dismissed sricharan-varanasi’s stale review April 10, 2026 20:42

Implemented requested change with commit 04c644f.

@divbzero
divbzero merged commit c52eaf6 into develop Apr 10, 2026
3 checks passed
@divbzero

Copy link
Copy Markdown
Contributor Author

For future reference, alternatives to regex that I considered for counting grapheme clusters:

  • grapheme — mature but unmaintained
  • ugrapheme — maintained but new and not widely used
  • uniseg — maintained and somewhat widely used

regex ended up being the natural choice because it’s mature, very widely used, actively maintained, and already an indirect dependency via fastapi-mail.

divbzero added a commit that referenced this pull request Apr 13, 2026
…2038)

🔗 [Jira Ticket M2-10505](https://mindlogger.atlassian.net/browse/M2-10505)

Changes include:

- Validate caseless characters in passwords as both uppercase and lowercase.

This is a follow-up to pull request #2036. After thinking through @jodybrookover’s comments, seems to make sense to allow caseless characters in passwords to validate as both uppercase and lowercase letters. There tend to be more caseless characters than uppercase or lowercase letters, and this matches the behavior already implemented on the frontend with:

- ChildMindInstitute/mindlogger-admin#2207
- ChildMindInstitute/mindlogger-app-refactor#1089
- ChildMindInstitute/mindlogger-web-refactor#719
divbzero added a commit that referenced this pull request Apr 27, 2026
🔗 [Jira Ticket M2-10505](https://mindlogger.atlassian.net/browse/M2-10505)

Changes include:

- Reject passwords that contain standard emoji or regional indicators.

This is a follow-up to pull requests #2036 and #2038 that brings backend password validation in line with what @adeiji implemented for emojis on the front end in:

- ChildMindInstitute/mindlogger-admin#2207
- ChildMindInstitute/mindlogger-app-refactor#1089
- ChildMindInstitute/mindlogger-web-refactor#719
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