#32713: URLValidator tests failing on Python versions patched for bpo-43882
-------------------------------------+-------------------------------------
     Reporter:  Michał Górny         |                    Owner:  Mariusz
                                     |  Felisiak
         Type:  Bug                  |                   Status:  closed
    Component:  Core (Other)         |                  Version:  2.2
     Severity:  Normal               |               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 Mariusz Felisiak <felisiak.mariusz@…>):

 In [changeset:"afb23f5929944a407e4990edef1c7806a94c9879" afb23f59]:
 {{{
 #!CommitTicketReference repository=""
 revision="afb23f5929944a407e4990edef1c7806a94c9879"
 [3.1.x] Fixed #32713, Fixed CVE-2021-32052 -- Prevented newlines and tabs
 from being accepted in URLValidator on Python 3.9.5+.

 In Python 3.9.5+ urllib.parse() automatically removes ASCII newlines
 and tabs from URLs [1, 2]. Unfortunately it created an issue in
 the URLValidator. URLValidator uses urllib.urlsplit() and
 urllib.urlunsplit() for creating a URL variant with Punycode which no
 longer contains newlines and tabs in Python 3.9.5+. As a consequence,
 the regular expression matched the URL (without unsafe characters) and
 the source value (with unsafe characters) was considered valid.

 [1] https://bugs.python.org/issue43882 and
 [2]
 
https://github.com/python/cpython/commit/76cd81d60310d65d01f9d7b48a8985d8ab89c8b4

 Backport of e1e81aa1c4427411e3c68facdd761229ffea6f6f from main.
 }}}

-- 
Ticket URL: <https://code.djangoproject.com/ticket/32713#comment:8>
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/064.e069b6555a2e7b6f248bd820fbbd7f39%40djangoproject.com.

Reply via email to