Issues with texts (and other content) created by users with ":" in their username #1832

Open
opened 2013-08-26 15:42:48 +00:00 by rlx · 4 comments
Owner

Username not properly encoded in the URL, and editing text causes server error.

Traceback (most recent call last):

  File "/srv/pandora/src/django/django/core/handlers/base.py", line 111, in get_response
    response = callback(request, *callback_args, **callback_kwargs)

  File "/srv/pandora/src/python-ox/ox/django/api/views.py", line 38, in api
    response = f(request)

  File "/srv/pandora/src/python-ox/ox/django/decorators.py", line 18, in _wrapped_view
    return function(request, *args, **kwargs)

  File "/srv/pandora/pandora/text/views.py", line 126, in editText
    text, created = models.Text.objects.get_or_create(name=name, user=models.User.objects.get(username=username))

  File "/srv/pandora/src/django/django/db/models/manager.py", line 131, in get
    return self.get_query_set().get(*args, **kwargs)

  File "/srv/pandora/src/django/django/db/models/query.py", line 366, in get
    % self.model._meta.object_name)

DoesNotExist: User matching query does not exist.
Username not properly encoded in the URL, and editing text causes server error. ``` Traceback (most recent call last): File "/srv/pandora/src/django/django/core/handlers/base.py", line 111, in get_response response = callback(request, *callback_args, **callback_kwargs) File "/srv/pandora/src/python-ox/ox/django/api/views.py", line 38, in api response = f(request) File "/srv/pandora/src/python-ox/ox/django/decorators.py", line 18, in _wrapped_view return function(request, *args, **kwargs) File "/srv/pandora/pandora/text/views.py", line 126, in editText text, created = models.Text.objects.get_or_create(name=name, user=models.User.objects.get(username=username)) File "/srv/pandora/src/django/django/db/models/manager.py", line 131, in get return self.get_query_set().get(*args, **kwargs) File "/srv/pandora/src/django/django/db/models/query.py", line 366, in get % self.model._meta.object_name) DoesNotExist: User matching query does not exist. ```
rlx added the
general
label 2013-08-26 15:42:48 +00:00
0x2620 was assigned by rlx 2013-08-26 15:42:48 +00:00
rlx added the
defect
normal
major
labels 2013-08-26 15:43:07 +00:00
Owner

one option is to not allow : in usernames, right now all backend code expects the first : to be the division between username and list/text/edit

one option is to not allow : in usernames, right now all backend code expects the first : to be the division between username and list/text/edit
Owner

on that note, we have one user with : on 0xdb

on that note, we have one user with : on 0xdb
Author
Owner

This is not just a URL issue, but also an issue with ids. We want the users foo and foo:bar to be able to create the text foo:bar:baz, and we want the users foo:bar and foo%3Abar to coexist. ('%' as such works in usernames, i.e. gets encoded in the URL.)

This is not just a URL issue, but also an issue with ids. We want the users foo and foo:bar to be able to create the text foo:bar:baz, and we want the users foo:bar and foo%3Abar to coexist. ('%' as such works in usernames, i.e. gets encoded in the URL.)
Author
Owner

In the spirit of _ becomes %09 = tab, : (in usernames in item ids) could become %0B = vertical tab.

In the spirit of _ becomes %09 = tab, : (in usernames in item ids) could become %0B = vertical tab.
rlx added this to the 13.03 milestone 2014-02-10 05:08:35 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: 0x2620/pandora#1832
No description provided.