Code

Opened 5 years ago

Closed 5 years ago

#11610 closed (invalid)

NoReverseMatch on users with @ in name

Reported by: alex.trofast@… Owned by: nobody
Component: Core (Other) Version: 1.0
Severity: Keywords: noreversematch
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

The function RegexURLResolver.reverse throws a NoReverseMatch exception on users with the symbol @ in their username. It is possible to create such users in the ReviewBoard application. Let me know if further information is need, I'll be happy to supply. Thank you for a great product.

TemplateSyntaxError at /r/4/

Caught an exception while rendering: Reverse for 'user' with arguments '(<User: xyz@xyx.com>,)' and keyword arguments '{}' not found.

Original Traceback (most recent call last):
  File "/usr/lib/python2.4/site-packages/Django-1.1-py2.4.egg/django/template/debug.py", line 71, in render_node
    result = node.render(context)
  File "/usr/lib/python2.4/site-packages/Django-1.1-py2.4.egg/django/template/defaulttags.py", line 382, in render
    raise e
NoReverseMatch: Reverse for 'user' with arguments '(<User: xyz@xyz.com>,)' and keyword arguments '{}' not found.

Request Method: 	GET
Request URL: 	http://example.com/r/4/
Exception Type: 	TemplateSyntaxError
Exception Value: 	

Caught an exception while rendering: Reverse for 'user' with arguments '(<User: xyz@xyz.com>,)' and keyword arguments '{}' not found.

Original Traceback (most recent call last):
  File "/usr/lib/python2.4/site-packages/Django-1.1-py2.4.egg/django/template/debug.py", line 71, in render_node
    result = node.render(context)
  File "/usr/lib/python2.4/site-packages/Django-1.1-py2.4.egg/django/template/defaulttags.py", line 382, in render
    raise e
NoReverseMatch: Reverse for 'user' with arguments '(<User: xyz@xyz.com>,)' and keyword arguments '{}' not found.

Exception Location: 	/usr/lib/python2.4/site-packages/Django-1.1-py2.4.egg/django/template/debug.py in render_node, line 81
Python Executable: 	/usr/bin/python
Python Version: 	2.4.3

Attachments (0)

Change History (1)

comment:1 Changed 5 years ago by kmtracey

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to invalid
  • Status changed from new to closed

It looks to me like reviewboard is the code that has provided a named url 'user' that does not allow '@' in the user name:

http://code.google.com/p/reviewboard/source/browse/trunk/reviewboard/urls.py#81

Thus I think it is reviewboard you need to file an issue against, not Django.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.