| 1 |
========================== |
| 2 |
Django 3.2.2 release notes |
| 3 |
========================== |
| 4 |
|
| 5 |
*May 6, 2021* |
| 6 |
|
| 7 |
Django 3.2.2 fixes a security issue and a bug in 3.2.1. |
| 8 |
|
| 9 |
CVE-2021-32052: Header injection possibility since ``URLValidator`` accepted newlines in input on Python 3.9.5+ |
| 10 |
=============================================================================================================== |
| 11 |
|
| 12 |
On Python 3.9.5+, :class:`~django.core.validators.URLValidator` didn't prohibit |
| 13 |
newlines and tabs. If you used values with newlines in HTTP response, you could |
| 14 |
suffer from header injection attacks. Django itself wasn't vulnerable because |
| 15 |
:class:`~django.http.HttpResponse` prohibits newlines in HTTP headers. |
| 16 |
|
| 17 |
Moreover, the ``URLField`` form field which uses ``URLValidator`` silently |
| 18 |
removes newlines and tabs on Python 3.9.5+, so the possibility of newlines |
| 19 |
entering your data only existed if you are using this validator outside of the |
| 20 |
form fields. |
| 21 |
|
| 22 |
This issue was introduced by the :bpo:`43882` fix. |
| 23 |
|
| 24 |
Bugfixes |
| 25 |
======== |
| 26 |
|
| 27 |
* Prevented, following a regression in Django 3.2.1, :djadmin:`makemigrations` |
| 28 |
from generating infinite migrations for a model with ``Meta.ordering`` |
| 29 |
contained ``OrderBy`` expressions (:ticket:`32714`). |