Failure to save filter if username contains @ or .

Bug #1217880 reported by Neil Williams
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
LAVA Dashboard (deprecated)
Fix Released
High
Paul Sokolovsky

Bug Description

Django (since 1.2) supports usernames which are, effectively, email addresses and this is what Crowd is currently using. However, dashboard_app/views/filters/views.py fails if the username passed when trying to save the filter contains either of these characters:

NoReverseMatch at /dashboard/filters/+add
Reverse for 'dashboard_app.views.filters.views.filter_detail' with arguments '(u'testuser@linaro-org', u'test2')' and keyword arguments '{}' not found.

Changing this to:

testuser-linaro.org -> Fail

testuser@linaro-org -> Fail

testuser-linaro-org -> Saved filter created.

Other functions within LAVA seem to work, including job submission, despite these characters in the username.

Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote : Re: [Bug 1217880] [NEW] Failure to save filter if username contains @ or .

Yay using regexps for routing. This just needs an update to urls.py I
think.

I hope usernames are not permitted to contain '/' or '?' :)

Changed in lava-dashboard:
assignee: nobody → Paul Sokolovsky (pfalcon)
importance: Undecided → High
status: New → Confirmed
Changed in lava-dashboard:
status: Confirmed → In Progress
Revision history for this message
Paul Sokolovsky (pfalcon) wrote :

Complete backtrace:

File "/srv/lava/.cache/eggs/Django-1.4.2-py2.7.egg/django/core/handlers/base.py" in get_response
  111. response = callback(request, *callback_args, **callback_kwargs)
File "/srv/lava/.cache/eggs/Django-1.4.2-py2.7.egg/django/contrib/auth/decorators.py" in _wrapped_view
  20. return view_func(request, *args, **kwargs)
File "/srv/lava/.<email address hidden>/dashboard_app/views/filters/views.py" in filter_add
  197. BreadCrumbTrail.leading_to(filter_add))
File "/srv/lava/.<email address hidden>/dashboard_app/views/filters/views.py" in filter_form
  169. return HttpResponseRedirect(filter.get_absolute_url())
File "/srv/lava/.cache/eggs/Django-1.4.2-py2.7.egg/django/utils/functional.py" in _curried
  11. return _curried_func(*(args+moreargs), **dict(kwargs, **morekwargs))
File "/srv/lava/.cache/eggs/Django-1.4.2-py2.7.egg/django/db/models/base.py" in get_absolute_url
  883. return settings.ABSOLUTE_URL_OVERRIDES.get('%s.%s' % (opts.app_label, opts.module_name), func)(self, *args, **kwargs)
File "/srv/lava/.cache/eggs/Django-1.4.2-py2.7.egg/django/db/models/__init__.py" in inner
  35. return reverse(bits[0], None, *bits[1:3])
File "/srv/lava/.cache/eggs/Django-1.4.2-py2.7.egg/django/core/urlresolvers.py" in reverse
  476. return iri_to_uri(resolver._reverse_with_prefix(view, prefix, *args, **kwargs))
File "/srv/lava/.cache/eggs/Django-1.4.2-py2.7.egg/django/core/urlresolvers.py" in _reverse_with_prefix
  396. "arguments '%s' not found." % (lookup_view_s, args, kwargs))

Exception Type: NoReverseMatch at /dashboard/filters/+add
Exception Value: Reverse for 'dashboard_app.views.filters.views.filter_detail' with arguments '(<email address hidden>', u'foo')' and keyword arguments '{}' not found.

Revision history for this message
Paul Sokolovsky (pfalcon) wrote :
Changed in lava-dashboard:
status: In Progress → Fix Released
Changed in lava-dashboard:
milestone: none → 2013.09
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.