Skip to content

🐛 Bug Report: Strict Regex rejecting valid passwords with certain special characters during Signup #567

@SUMIQVERSE

Description

@SUMIQVERSE

📜 Description

Description:

While testing the local environment setup, I discovered that the backend password validation logic is too restrictive. It rejects passwords that actually meet all stated security criteria (uppercase, lowercase, number, and special character) if they contain certain special characters like #.

Steps to Reproduce:

1.Navigate to the frontend Signup page (/signup).
2.Fill in a valid username and email.
3.Enter a password that includes a mix of allowed characters but specifically includes the # symbol (e.g., TestUser@#1357).
4.Click on the Create Account button.
5.Observe the UI throwing a "Validation failed" error.
6.Check the Network tab response for the POST /api/auth/signup request.

Expected Behavior:

The backend should accept the password and successfully create the user, as the provided password meets the requirement of containing an uppercase letter, lowercase letter, number, and a special character.

Actual Behavior:

The server returns a 400 Bad Request status code with the following JSON response payload:

Assign me

I would like to fix this under the GSSOC 26. Please assign me.

What browsers are you seeing the problem on?

No response

📃 Relevant Screenshots (Links)

Image

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions