Opened 17 years ago
Closed 17 years ago
#5308 closed (fixed)
[Patch] Redirect from pages that need login and have Unicode URL causes error
Reported by: | Julian Bez | Owned by: | nobody |
---|---|---|---|
Component: | Contrib apps | Version: | dev |
Severity: | Keywords: | unicode url login auth decorator checklogin redirect quote sprintsept14 | |
Cc: | Triage Stage: | Ready for checkin | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
How to repeat:
have a page that has encoded Unicode in URL, like http://www.example.com/gie%C3%9Fen/xyz/.
Make that page available to authenticated users only.
Try browsing to it when not logged in.
I get an error. On other pages, where there's a 'normal' URL, not.
Traceback (most recent call last): File "/usr/local/lib/python2.4/site-packages/django/core/handlers/base.py", line 77, in get_response response = callback(request, *callback_args, **callback_kwargs) File "/usr/local/lib/python2.4/site-packages/django/contrib/auth/decorators.py", line 18, in _checklogin return HttpResponseRedirect('%s?%s=%s' % (login_url, REDIRECT_FIELD_NAME, quote(request.get_full_path()))) File "/usr/local/lib/python2.4/urllib.py", line 1117, in quote res = map(safe_map.__getitem__, s) KeyError: u'\xdf'
Attachments (1)
Change History (6)
by , 17 years ago
Attachment: | decorators.py.patch added |
---|
comment:1 by , 17 years ago
Has patch: | set |
---|
comment:2 by , 17 years ago
Summary: | Redirect from pages that need login and have Unicode URL causes error → [Patch] Redirect from pages that need login and have Unicode URL causes error |
---|
comment:3 by , 17 years ago
Keywords: | sprintsept14 added |
---|
comment:4 by , 17 years ago
Triage Stage: | Unreviewed → Ready for checkin |
---|
comment:5 by , 17 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
Make it now ready for checkin because I believe this patch solves it.