#28883: uuid URL path converter failed if UUID is anything but lowercase
-----------------------------+--------------------------------------
     Reporter:  Jean-Daniel  |                    Owner:  nobody
         Type:  Bug          |                   Status:  new
    Component:  Core (URLs)  |                  Version:  2.0
     Severity:  Normal       |               Resolution:
     Keywords:  uuid         |             Triage Stage:  Unreviewed
    Has patch:  0            |      Needs documentation:  0
  Needs tests:  0            |  Patch needs improvement:  0
Easy pickings:  0            |                    UI/UX:  0
-----------------------------+--------------------------------------

Old description:

> According to RFC4122:
>
> {{{
> Each field is treated as an integer and has its value printed as a zero-
> filled hexadecimal digit string with the most significant digit first.
> The hexadecimal values "a" through "f" are output as lower case
> characters and are case insensitive on input.
> }}}
>
> Actually, when trying to parse uuid using the url dispatcher's "uuid path
> convert", it returns URL not found for anything but lower case UUID,
> which is surprising as they should be case insensitive.
>
> The uuid path converter should be updated to support upper, lower or even
> mixed case UUID, as long as they are properly formatted.

New description:

 According to [https://tools.ietf.org/html/rfc4122 RFC4122]:

 {{{
 Each field is treated as an integer and has its value printed as a zero-
 filled hexadecimal digit string with the most significant digit first.
 The hexadecimal values "a" through "f" are output as lower case characters
 and are case insensitive on input.
 }}}

 Actually, when trying to parse uuid using the url dispatcher's "uuid path
 convert", it returns URL not found for anything but lower case UUID, which
 is surprising as they should be case insensitive.

 The uuid path converter should be updated to support upper, lower or even
 mixed case UUID, as long as they are properly formatted.

--

Comment (by Tim Graham):

 I'm not sure this change is desirable, at least for everyone, as that
 would permit many URLs (all case combinations) to map to the same page. A
 [https://groups.google.com/d/msg/django-
 developers/Y51CKkqq6Ng/9DAO7yaVEAAJ django-developers discussion] didn't
 yield any objections to removing support for case-insensitive URLs (via
 `(?i)` in URL patterns).

 Also, with the current architecture URL converters, I don't think it's
 possible to implement this.

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

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/069.e5f5fcf95522ebc775e78a0a64ae67cd%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to