chore: update password policy regex and message#814
Conversation
WalkthroughUpdated default password policy in src/envVariables.js by changing the regex to a more permissive set of criteria and adjusting the corresponding user-facing message. No other environment variables or control flow were modified. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
✨ Finishing Touches
🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (3)
src/envVariables.js (3)
206-207: Widen special-char class to full ASCII punctuation to avoid user surprises.Current set omits common symbols like colon (:), brackets ([]), and pipe (|). Using ASCII punctuation ranges is simpler and more inclusive.
- default: '^(?=.*\\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[~!@#$%^&*()_+`\\-={}"\';<>?,./\\\\]).{8,}$', + default: '^(?=.*\\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[!-/:-@[-`{-~]).{8,}$',
212-213: Clarify and tighten the message (punctuation + wording).Minor copy tweak; aligns with style and avoids “contain” ambiguity.
- 'Password must contain at least 8 characters, one uppercase, one lowercase, one number and one special character', + 'Password must be at least 8 characters and include one uppercase, one lowercase, one number, and one special character.',
206-213: Policy note: consider length-over-complexity.If compliance allows, prefer a longer minimum length (e.g., 12+) over composition rules; it improves usability without weakening security.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
src/envVariables.js(1 hunks)
🔇 Additional comments (1)
src/envVariables.js (1)
206-213: All downstream password validations and messages now reference PASSWORD_POLICY_REGEX and PASSWORD_POLICY_MESSAGE; no inconsistencies detected.
Summary by CodeRabbit