Skip to content

Conversation

@ihsaan-ullah
Copy link
Collaborator

@ihsaan-ullah ihsaan-ullah commented Mar 14, 2025

@Didayolo @ObadaS

A brief description of the purpose of the changes contained in this PR.

Special characters in username are problematic when django creates URLs. This PR restricts users to not use special characters in their usernames during signup

Issues this PR resolves

A checklist for hand testing

  • Check that you cannot create an account if you have special character, capital letter in your username

Checklist

  • Code review by me
  • Hand tested by me
  • I'm proud of my work
  • Code review by reviewer
  • Hand tested by reviewer
  • CircleCi tests are passing
  • Ready to merge

@ihsaan-ullah ihsaan-ullah linked an issue Mar 14, 2025 that may be closed by this pull request
1 task
@ObadaS
Copy link
Collaborator

ObadaS commented Mar 14, 2025

Wouldn't it be better, if possible, to allow special character in the name but change the way Django creates URL to "sanitize" the input first, removing the special characters ?

With this fix, people that have special characters in their name won't be to create an account without having to remove them.

@ihsaan-ullah
Copy link
Collaborator Author

I think special characters should not be allowed in usernames. This was the case in the code but it was not working. In this PR I have changed the code to fix that code.

@Didayolo Didayolo self-assigned this Mar 20, 2025
@Didayolo Didayolo merged commit 197f334 into develop Mar 21, 2025
1 check passed
@Didayolo Didayolo deleted the username_special_chars branch March 21, 2025 00:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Issue to log in

4 participants