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

NoReverseMatch for usernames containing + #733

Closed
berkerpeksag opened this issue Apr 14, 2015 · 3 comments
Closed

NoReverseMatch for usernames containing + #733

berkerpeksag opened this issue Apr 14, 2015 · 3 comments

Comments

@berkerpeksag
Copy link
Member

Saw this at Sentry: https://app.getsentry.com/python-software-foundation/production/group/62615414/

The question is should we allow + in username and slug (slug is acvtually the username field here) fields (see https://github.com/python/pythondotorg/blob/master/users/urls.py#L17), or should be raise a ValidationError in https://github.com/python/pythondotorg/blob/master/users/forms.py#L9?

@berkerpeksag
Copy link
Member Author

Full message (username redacted):

NoReverseMatch Root Cause
Reverse for 'user_detail' with arguments '()' and keyword arguments '{'slug': 'foo+--+'}' not found. 1 pattern(s) tried: ['users/(?P<slug>[-_\\w\\@\\.]+)/$']

Another solution:

@berkerpeksag
Copy link
Member Author

Accept + for existing users in https://github.com/python/pythondotorg/blob/master/users/urls.py#L17

This was done in c52fb5e.

berkerpeksag added a commit to berkerpeksag/pythondotorg that referenced this issue Aug 13, 2015
@berkerpeksag
Copy link
Member Author

Added a test case for this in #809.

berkerpeksag added a commit that referenced this issue Aug 18, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant