feature: implement strong password policy for signup and reset-password#92
Open
PranavObliterates wants to merge 3 commits intotarinagarwal:mainfrom
Open
Conversation
Contributor
Author
|
@Community-Programmer please review and merge. |
Community-Programmer
requested changes
Jan 7, 2026
19 tasks
Contributor
Author
|
@Community-Programmer please review and let me know ✅ Updated based on review feedbackChanges made:
The password policy now matches the strength meter from PR #85 exactly. 🎯 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🔒 Fixes #90
Summary
This PR implements a comprehensive strong password policy for user authentication to enhance account security across the Edulume platform.
Changes Made
New Files
server/utils/passwordValidator.js: Created a new utility module for password validation with comprehensive security checksModified Files
server/routes/auth.js:/signuproute to use strong password validation/reset-passwordroute to use strong password validationPassword Policy Requirements
The new password policy enforces the following requirements:
✅ Minimum 8 characters long
✅ At least one uppercase letter (A-Z)
✅ At least one lowercase letter (a-z)
✅ At least one number (0-9)
✅ At least one special character (!@#$%^&*...)
✅ Not a common/weak password (e.g., 'password', '123456')
✅ No sequential characters (e.g., 'abc', '123')
✅ No repeated characters (e.g., 'aaa', '111')
Validation Examples
❌ Passwords that will be REJECTED:
password→ Too commonPass123→ No special character, too shortPassword1→ No special characterPassword123!→ Contains sequential charactersPassss123!→ Contains repeated characters123456→ Too common, no lettersAbc123!→ Too short (only 7 characters)✅ Passwords that will be ACCEPTED:
MyP@ssw0rd!Secure#Pass123C0mpl3x!PassStr0ng&Secur3Implementation Details
Backend Validation
/signupand/reset-passwordendpoints