[Django] #33164: UUID URL converter should support uppercase hexadecimal digits

3 views
Skip to first unread message

Django

unread,
Oct 2, 2021, 10:31:17 PM10/2/21
to django-...@googlegroups.com
#33164: UUID URL converter should support uppercase hexadecimal digits
-----------------------------------------+---------------------------
Reporter: renatoalencar | Owner: nobody
Type: Bug | Status: new
Component: Core (URLs) | Version: dev
Severity: Normal | Keywords: uuid, url
Triage Stage: Unreviewed | Has patch: 1
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-----------------------------------------+---------------------------
According to the RFC4122 A Universally Unique IDentifier (UUID) URN
Namespace, the formal definition of an UUID string includes hexadecimal
digits in uppercase. But the current implementation of the UUID URL
converter only supports lowercase digits (from a to f).

* https://datatracker.ietf.org/doc/html/rfc4122
* https://github.com/django/django/blob/main/django/urls/converters.py#L26

--
Ticket URL: <https://code.djangoproject.com/ticket/33164>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Oct 2, 2021, 10:38:05 PM10/2/21
to django-...@googlegroups.com
#33164: UUID URL converter should support uppercase hexadecimal digits
--------------------------------+--------------------------------------
Reporter: Renato Alencar | Owner: nobody

Type: Bug | Status: new
Component: Core (URLs) | Version: dev
Severity: Normal | Resolution:

Keywords: uuid, url | Triage Stage: Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------+--------------------------------------
Description changed by Renato Alencar:

Old description:

> According to the RFC4122 A Universally Unique IDentifier (UUID) URN
> Namespace, the formal definition of an UUID string includes hexadecimal
> digits in uppercase. But the current implementation of the UUID URL
> converter only supports lowercase digits (from a to f).
>
> * https://datatracker.ietf.org/doc/html/rfc4122
> *
> https://github.com/django/django/blob/main/django/urls/converters.py#L26

New description:

According to the RFC4122 A Universally Unique IDentifier (UUID) URN
Namespace, the formal definition of an UUID string includes hexadecimal
digits in uppercase. But the current implementation of the UUID URL
converter only supports lowercase digits (from a to f).

Related PR: https://github.com/django/django/pull/14928

--

--
Ticket URL: <https://code.djangoproject.com/ticket/33164#comment:1>

Django

unread,
Oct 4, 2021, 12:14:41 AM10/4/21
to django-...@googlegroups.com
#33164: UUID URL converter should support uppercase hexadecimal digits
--------------------------------+--------------------------------------
Reporter: Renato Alencar | Owner: nobody
Type: New feature | Status: closed

Component: Core (URLs) | Version: dev
Severity: Normal | Resolution: wontfix

Keywords: uuid, url | Triage Stage: Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------+--------------------------------------
Changes (by Mariusz Felisiak):

* status: new => closed
* type: Bug => New feature
* resolution: => wontfix


Comment:

Thanks for this ticket, however this is a
[https://docs.djangoproject.com/en/3.2/topics/http/urls/#path-converters
document] and intended behavior which prevents multiple URLs from mapping
to the same page:

> `uuid` - Matches a formatted UUID. To prevent multiple URLs from mapping
to the same page, dashes must be included and **letters must be
lowercase**. For example, `075194d3-6885-417e-a8a8-6c931e272f00`. Returns
a UUID instance.

See #28883 for a related discussion.

--
Ticket URL: <https://code.djangoproject.com/ticket/33164#comment:2>

Reply all
Reply to author
Forward
0 new messages