Skip to content

fix: unify password validation across Signup, ForgotPassword and ResetPassword - #2034

Merged
riteshbonthalakoti merged 1 commit into
riteshbonthalakoti:gssocfrom
Aryanbansal-05:Aryan-05-2
Jun 6, 2026
Merged

fix: unify password validation across Signup, ForgotPassword and ResetPassword#2034
riteshbonthalakoti merged 1 commit into
riteshbonthalakoti:gssocfrom
Aryanbansal-05:Aryan-05-2

Conversation

@Aryanbansal-05

Copy link
Copy Markdown

…tPassword

🔐 Summary

Resolves #1976 by standardizing password validation rules across all three authentication flows — Signup, ForgotPassword, and ResetPassword.


🛠️ Changes Made

1. Frontend/src/utils/validatePassword.js — New Shared Utility

Created a reusable validatePassword function enforcing:

  • Minimum 8 characters
  • At least one lowercase letter
  • At least one uppercase letter
  • At least one number

2. Frontend/src/pages/ForgotPassword.jsx

  • Replaced weak 6-character-only check with shared validatePassword utility
  • Updated button disabled condition from length < 6 to length < 8

3. Frontend/src/pages/ResetPassword.jsx

  • Replaced length-only check with shared validatePassword utility
  • Now enforces full complexity requirements on password reset

4. Frontend/src/pages/Signup.jsx

  • Fixed passwordRules from { minLength: 6 } to { minLength: 8, requireUppercase: true, requireNumber: true }
  • Ensures getPasswordValidation enforces the same complexity as other flows

🛡️ Security Issues Fixed

  • ✅ ForgotPassword no longer allows weak 6-character passwords
  • ✅ ResetPassword now enforces complexity, not just length
  • ✅ All three flows now enforce identical password policy

Closes #1976

@vercel

vercel Bot commented Jun 6, 2026

Copy link
Copy Markdown

@Aryanbansal-05 is attempting to deploy a commit to the ritesh Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai

coderabbitai Bot commented Jun 6, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 1efb6595-28a8-4ce3-9483-609807046ef3

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with 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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@riteshbonthalakoti riteshbonthalakoti added gssoc GirlScript Summer of Code gssoc:approved GSSoC Approved PR level:critical Critical level difficulty quality:exceptional Exceptional code quality type:bug Bug fix labels Jun 6, 2026
@riteshbonthalakoti

Copy link
Copy Markdown
Owner

Hi @Aryanbansal-05! Thanks for the contribution. I have triaged your PR and set it to merge into the gssoc branch.

⚠️ MANDATORY GSSOC ONBOARDING STEPS:
Before your PR points are finalized on the leaderboard, you MUST complete these required steps:

  1. Star this repository: https://github.com/ritesh-1918/HELPDESK.AI (Mandatory)
  2. 👤 Follow the Project Admin: https://github.com/ritesh-1918 (Mandatory)
  3. 💼 Connect on LinkedIn: https://www.linkedin.com/in/ritesh1908/ (Mandatory)

Welcome to the HELPDESK.AI developer family! 🚀💻

@riteshbonthalakoti

Copy link
Copy Markdown
Owner

Superb implementation, @Aryanbansal-05! I've successfully resolved all conflicts in your PR and queued it for merging into gssoc.

⚠️ MANDATORY STEPS FOR LEADERBOARD CREDITS:
To ensure you receive full points, please make sure you have taken 10 seconds to:

Keep up the outstanding work! Let's build together! 🔥

@riteshbonthalakoti

Copy link
Copy Markdown
Owner

Hi @Aryanbansal-05! Thanks for the contribution. I have triaged your PR and set it to merge into the gssoc branch.

⚠️ MANDATORY GSSOC ONBOARDING STEPS:
Before your PR points are finalized on the leaderboard, you MUST complete these required steps:

  1. Star this repository: https://github.com/ritesh-1918/HELPDESK.AI (Mandatory)
  2. 👤 Follow the Project Admin: https://github.com/ritesh-1918 (Mandatory)
  3. 💼 Connect on LinkedIn: https://www.linkedin.com/in/ritesh1908/ (Mandatory)

Welcome to the HELPDESK.AI developer family! 🚀💻

1 similar comment
@riteshbonthalakoti

Copy link
Copy Markdown
Owner

Hi @Aryanbansal-05! Thanks for the contribution. I have triaged your PR and set it to merge into the gssoc branch.

⚠️ MANDATORY GSSOC ONBOARDING STEPS:
Before your PR points are finalized on the leaderboard, you MUST complete these required steps:

  1. Star this repository: https://github.com/ritesh-1918/HELPDESK.AI (Mandatory)
  2. 👤 Follow the Project Admin: https://github.com/ritesh-1918 (Mandatory)
  3. 💼 Connect on LinkedIn: https://www.linkedin.com/in/ritesh1908/ (Mandatory)

Welcome to the HELPDESK.AI developer family! 🚀💻

@riteshbonthalakoti

Copy link
Copy Markdown
Owner

Superb implementation, @Aryanbansal-05! I've successfully resolved all conflicts in your PR and queued it for merging into gssoc.

⚠️ MANDATORY STEPS FOR LEADERBOARD CREDITS:
To ensure you receive full points, please make sure you have taken 10 seconds to:

Keep up the outstanding work! Let's build together! 🔥

@riteshbonthalakoti
riteshbonthalakoti merged commit 15c036e into riteshbonthalakoti:gssoc Jun 6, 2026
2 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gssoc:approved GSSoC Approved PR gssoc GirlScript Summer of Code level:critical Critical level difficulty quality:exceptional Exceptional code quality type:bug Bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants