Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update username regex pattern in routes #2566

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

KipSigei
Copy link
Contributor

@KipSigei KipSigei commented Mar 8, 2024

Changes / Features implemented

  • Updates the regex pattern to accommodate usernames with a broader range of characters. While the previous pattern (?P<username>\w+) only allowed alphanumeric characters and underscores, the new pattern (?P<username>[^/]+) permits any characters except forward slashes

Steps taken to verify this change does what is intended

  • Added tests

Side effects of implementing this change

  • The change permits any username characters except forward slashes

Before submitting this PR for review, please make sure you have:

  • Included tests
  • Updated documentation

Closes #

@KipSigei KipSigei force-pushed the update-django-admin-username-validation branch 2 times, most recently from ba34cb2 to 88f05fc Compare March 8, 2024 06:44
Signed-off-by: Kipchirchir Sigei <arapgodsmack@gmail.com>
@KipSigei KipSigei force-pushed the update-django-admin-username-validation branch from 02eecba to 37f4237 Compare March 8, 2024 07:45
Signed-off-by: Kipchirchir Sigei <arapgodsmack@gmail.com>
@KipSigei KipSigei force-pushed the update-django-admin-username-validation branch from 37f4237 to 7d8bee7 Compare March 8, 2024 07:45
FrankApiyo
FrankApiyo previously approved these changes Mar 8, 2024
Signed-off-by: Kipchirchir Sigei <arapgodsmack@gmail.com>
Signed-off-by: Kipchirchir Sigei <arapgodsmack@gmail.com>
@KipSigei KipSigei changed the title Update username validation to disallow hyphenated usernames on django admin Update username regex pattern in routes Mar 14, 2024
Signed-off-by: Kipchirchir Sigei <arapgodsmack@gmail.com>
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.

2 participants