#33365: Functionality change in 3.2.10 for re_path
-------------------------------------+-------------------------------------
               Reporter:  Pkt        |          Owner:  nobody
                   Type:  Bug        |         Status:  new
              Component:  Core       |        Version:  3.2
  (URLs)                             |       Keywords:  3.2.10 resolvers
               Severity:  Normal     |  re_path
           Triage Stage:             |      Has patch:  0
  Unreviewed                         |
    Needs documentation:  0          |    Needs tests:  0
Patch needs improvement:  0          |  Easy pickings:  0
                  UI/UX:  0          |
-------------------------------------+-------------------------------------
 3.2.10 does the following change in urls/resolvers.conf:

 out:
 {{{
         match = self.regex.search(path)
 }}}

 in:
 {{{
         match = (
             self.regex.fullmatch(path)
             if self._is_endpoint and self.regex.pattern.endswith('$')
             else self.regex.search(path)
         )
 }}}

 Now, that's a big change, because I have an endpoint that is now giving
 404s:

 {{{
     re_path(r"validate$", ValidateView.as_view(), name="validate"),
 }}}

 The error is assuming that just because it ends in ''$'', it has to use
 fullmatch. I'm using (was using) that to catch ''/*whatever*/validate''
 urls.

 It is a big enough change that it should at least have been noted
 explicitly in the release notes. And, IMHO, it's a mistake (I'll admit to
 not having read the CVE that prompted this change).

-- 
Ticket URL: <https://code.djangoproject.com/ticket/33365>
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 on the web visit 
https://groups.google.com/d/msgid/django-updates/050.1bf99ca988f05c32cb7d04b64047ae56%40djangoproject.com.

Reply via email to