Skip to content

fix(auth): enforce password complexity and remove debug logs#2253

Merged
janavipandole merged 2 commits into
janavipandole:mainfrom
Prateek2007-cmd:fix/password-complexity
Jun 14, 2026
Merged

fix(auth): enforce password complexity and remove debug logs#2253
janavipandole merged 2 commits into
janavipandole:mainfrom
Prateek2007-cmd:fix/password-complexity

Conversation

@Prateek2007-cmd

Copy link
Copy Markdown
Contributor

Description

Closes #2247
This PR resolves security and code hygiene technical debt in the user registration flow:

  1. Unenforced Password Complexity: Previously, only a minimum length of 8 characters was required for passwords. This PR implements a strict regex-based complexity check that requires at least one uppercase letter, one lowercase letter, one number, and one special character, resolving the related TODO.
  2. Production Debug Logs: Removed lingering console.log statements from register.js that clutter the production console and could inadvertently leak execution context.

Changes Made

  • Added complexityRegex to register.js to validate the password against industry-standard complexity rules.
  • Added specific UI error messaging to messageBox to alert the user if the complexity requirements are not met.
  • Removed console.log("register.js loaded"); and console.log("Success:", data);.
  • Removed the obsolete // TODO: Prevent signup triggers if password complexity score is poor comment.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • Security patch

@vercel

vercel Bot commented Jun 13, 2026

Copy link
Copy Markdown

@Prateek2007-cmd is attempting to deploy a commit to the janavipandole's projects Team on Vercel.

A member of the Team first needs to authorize it.

@janavipandole janavipandole merged commit 58e2989 into janavipandole:main Jun 14, 2026
0 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Hardcoded Encryption Key in Client Code

2 participants