This pull request introduces input validation for the user registration endpoint to ensure that the data received adheres to our expected formats. By validating usernames, emails, and passwords before processing them, we aim to enhance the security and reliability of our user registration process.
Summary
Added input validation functions in a new utility file validateInput.js within the utils directory.
The validation functions include:
validateUsername to check if the username meets the criteria of being 3 to 20 characters long and only containing alphanumeric characters and underscores.
validateEmail to ensure the email is in a valid format.
validatePassword to verify the password contains at least one letter, one number, and is at least 8 characters long.
Imported and utilized these validation functions in user.routes.js to apply input validation logic to the user registration endpoint.
Fixes #123.
🎉 Latest improvements to Sweep:
New dashboard launched for real-time tracking of Sweep issues, covering all stages from search to coding.
Integration of OpenAI's latest Assistant API for more efficient and reliable code planning and editing, improving speed by 3x.
PR Feedback (click)
Description
This pull request introduces input validation for the user registration endpoint to ensure that the data received adheres to our expected formats. By validating usernames, emails, and passwords before processing them, we aim to enhance the security and reliability of our user registration process.
Summary
validateInput.js
within theutils
directory.validateUsername
to check if the username meets the criteria of being 3 to 20 characters long and only containing alphanumeric characters and underscores.validateEmail
to ensure the email is in a valid format.validatePassword
to verify the password contains at least one letter, one number, and is at least 8 characters long.user.routes.js
to apply input validation logic to the user registration endpoint.Fixes #123.
🎉 Latest improvements to Sweep:
💡 To get Sweep to edit this pull request, you can:
This is an automated message generated by Sweep AI.