Opened 18 years ago
Closed 18 years ago
#3640 closed (fixed)
Missing or mistyped 'language' parameter on /i18n/setlang/ raises a MultiValueDictKeyError
Reported by: | Owned by: | hugo | |
---|---|---|---|
Component: | Internationalization | Version: | dev |
Severity: | Keywords: | i18n | |
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
Django provides a setlang/ url which calls django.views.i18n.set_language(). This view expects to find a language paremeter in request.GET, but when this parameter is missing (or was mistyped) an exception is raised; which will generate 500 Server Error pages in production sites.
Attached is a very simple patch. When the language parameter is missing the view will behave as if the language specified was invalid.
Attachments (1)
Change History (3)
by , 18 years ago
Attachment: | i18n_set_language.diff added |
---|
comment:1 by , 18 years ago
Keywords: | i18n added |
---|---|
Triage Stage: | Unreviewed → Ready for checkin |
comment:2 by , 18 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
Avoid MultiValueDictKeyError in set_language() view