#36483: IntegerField will accept non-ASCII digits, which leads to the same page
appearing at many URLs
-------------------------------------+-------------------------------------
     Reporter:  Morgan Wahl          |                    Owner:  (none)
         Type:                       |                   Status:  closed
  Cleanup/optimization               |
    Component:  Core (URLs)          |                  Version:  5.2
     Severity:  Normal               |               Resolution:  wontfix
     Keywords:                       |             Triage Stage:
                                     |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by Morgan Wahl):

 * resolution:   => wontfix
 * status:  new => closed

Comment:

 Ah! That was a good question. In the case where I ran into this, I see
 we're doing

 ` re_path(r'^(?P<pk>\d+)/$', browse_views.material,
 name='browse.material'),`

 This particular code was written sometime before 2013, so `path` was not
 an option, and was originally running on Python 2, where `\d` only matches
 ASCII unless you passed the unicode flag.

 I see we just need to use `path` with `<int:...>` or limit the regex.

 Thanks for the help and sorry to take up your time!
-- 
Ticket URL: <https://code.djangoproject.com/ticket/36483#comment:5>
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 [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/django-updates/01070197c28ed657-91bd0ee4-dc59-4cdf-bd58-812ed7590ea8-000000%40eu-central-1.amazonses.com.

Reply via email to