Re: [Django] #35627: LocaleMiddleware does not handle ValueError 'lang_code' exceeds the maximum accepted length

8 views
Skip to first unread message

Django

unread,
Jul 25, 2024, 3:38:56 AM7/25/24
to django-...@googlegroups.com
#35627: LocaleMiddleware does not handle ValueError 'lang_code' exceeds the maximum
accepted length
-------------------------------------+-------------------------------------
Reporter: Lorenzo Peña | Owner: Lorenzo
| Peña
Type: Bug | Status: closed
Component: | Version: 5.0
Internationalization |
Severity: Release blocker | Resolution: fixed
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Sarah Boyce <42296566+sarahboyce@…>):

* resolution: => fixed
* status: assigned => closed

Comment:

In [changeset:"0e94f292cda632153f2b3d9a9037eb0141ae9c2e" 0e94f29]:
{{{#!CommitTicketReference repository=""
revision="0e94f292cda632153f2b3d9a9037eb0141ae9c2e"
Fixed #35627 -- Raised a LookupError rather than an unhandled ValueError
in get_supported_language_variant().

LocaleMiddleware didn't handle the ValueError raised by
get_supported_language_variant() when language codes were
over 500 characters.

Regression in 9e9792228a6bb5d6402a5d645bc3be4cf364aefb.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/35627#comment:7>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Jul 25, 2024, 3:41:23 AM7/25/24
to django-...@googlegroups.com
#35627: LocaleMiddleware does not handle ValueError 'lang_code' exceeds the maximum
accepted length
-------------------------------------+-------------------------------------
Reporter: Lorenzo Peña | Owner: Lorenzo
| Peña
Type: Bug | Status: closed
Component: | Version: 5.0
Internationalization |
Severity: Release blocker | Resolution: fixed
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Sarah Boyce <42296566+sarahboyce@…>):

In [changeset:"741f33eaf1801b34eaf6e3c72cb1af630de2eeb6" 741f33ea]:
{{{#!CommitTicketReference repository=""
revision="741f33eaf1801b34eaf6e3c72cb1af630de2eeb6"
[5.1.x] Fixed #35627 -- Raised a LookupError rather than an unhandled
ValueError in get_supported_language_variant().

LocaleMiddleware didn't handle the ValueError raised by
get_supported_language_variant() when language codes were
over 500 characters.

Regression in 9e9792228a6bb5d6402a5d645bc3be4cf364aefb.

Backport of 0e94f292cda632153f2b3d9a9037eb0141ae9c2e from main.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/35627#comment:8>

Django

unread,
Jul 25, 2024, 3:43:04 AM7/25/24
to django-...@googlegroups.com
#35627: LocaleMiddleware does not handle ValueError 'lang_code' exceeds the maximum
accepted length
-------------------------------------+-------------------------------------
Reporter: Lorenzo Peña | Owner: Lorenzo
| Peña
Type: Bug | Status: closed
Component: | Version: 5.0
Internationalization |
Severity: Release blocker | Resolution: fixed
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Sarah Boyce <42296566+sarahboyce@…>):

In [changeset:"e18601273a833fb25533f45527e364642ee3644d" e186012]:
{{{#!CommitTicketReference repository=""
revision="e18601273a833fb25533f45527e364642ee3644d"
[5.0.x] Fixed #35627 -- Raised a LookupError rather than an unhandled
ValueError in get_supported_language_variant().

LocaleMiddleware didn't handle the ValueError raised by
get_supported_language_variant() when language codes were
over 500 characters.

Regression in 9e9792228a6bb5d6402a5d645bc3be4cf364aefb.

Backport of 0e94f292cda632153f2b3d9a9037eb0141ae9c2e from main.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/35627#comment:9>

Django

unread,
Jul 25, 2024, 3:48:22 AM7/25/24
to django-...@googlegroups.com
#35627: LocaleMiddleware does not handle ValueError 'lang_code' exceeds the maximum
accepted length
-------------------------------------+-------------------------------------
Reporter: Lorenzo Peña | Owner: Lorenzo
| Peña
Type: Bug | Status: closed
Component: | Version: 5.0
Internationalization |
Severity: Release blocker | Resolution: fixed
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Sarah Boyce <42296566+sarahboyce@…>):

In [changeset:"96a349740048ecd4746ac2f15751865219d445cf" 96a34974]:
{{{#!CommitTicketReference repository=""
revision="96a349740048ecd4746ac2f15751865219d445cf"
[4.2.x] Fixed #35627 -- Raised a LookupError rather than an unhandled
ValueError in get_supported_language_variant().

LocaleMiddleware didn't handle the ValueError raised by
get_supported_language_variant() when language codes were
over 500 characters.

Regression in 9e9792228a6bb5d6402a5d645bc3be4cf364aefb.

Backport of 0e94f292cda632153f2b3d9a9037eb0141ae9c2e from main.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/35627#comment:10>
Reply all
Reply to author
Forward
0 new messages