| 1 |
=========================== |
| 2 |
Django 1.8.10 release notes |
| 3 |
=========================== |
| 4 |
|
| 5 |
*March 1, 2016* |
| 6 |
|
| 7 |
Django 1.8.10 fixes two security issues and several bugs in 1.8.9. |
| 8 |
|
| 9 |
CVE-2016-2512: Malicious redirect and possible XSS attack via user-supplied redirect URLs containing basic auth |
| 10 |
=============================================================================================================== |
| 11 |
|
| 12 |
Django relies on user input in some cases (e.g. |
| 13 |
``django.contrib.auth.views.login()`` and :doc:`i18n </topics/i18n/index>`) |
| 14 |
to redirect the user to an "on success" URL. The security check for these |
| 15 |
redirects (namely ``django.utils.http.is_safe_url()``) considered some URLs |
| 16 |
with basic authentication credentials "safe" when they shouldn't be. |
| 17 |
|
| 18 |
For example, a URL like ``http://mysite.example.com\@attacker.com`` would be |
| 19 |
considered safe if the request's host is ``http://mysite.example.com``, but |
| 20 |
redirecting to this URL sends the user to ``attacker.com``. |
| 21 |
|
| 22 |
Also, if a developer relies on ``is_safe_url()`` to provide safe redirect |
| 23 |
targets and puts such a URL into a link, they could suffer from an XSS attack. |
| 24 |
|
| 25 |
CVE-2016-2513: User enumeration through timing difference on password hasher work factor upgrade |
| 26 |
================================================================================================ |
| 27 |
|
| 28 |
In each major version of Django since 1.6, the default number of iterations for |
| 29 |
the ``PBKDF2PasswordHasher`` and its subclasses has increased. This improves |
| 30 |
the security of the password as the speed of hardware increases, however, it |
| 31 |
also creates a timing difference between a login request for a user with a |
| 32 |
password encoded in an older number of iterations and login request for a |
| 33 |
nonexistent user (which runs the default hasher's default number of iterations |
| 34 |
since Django 1.6). |
| 35 |
|
| 36 |
This only affects users who haven't logged in since the iterations were |
| 37 |
increased. The first time a user logs in after an iterations increase, their |
| 38 |
password is updated with the new iterations and there is no longer a timing |
| 39 |
difference. |
| 40 |
|
| 41 |
The new ``BasePasswordHasher.harden_runtime()`` method allows hashers to bridge |
| 42 |
the runtime gap between the work factor (e.g. iterations) supplied in existing |
| 43 |
encoded passwords and the default work factor of the hasher. This method |
| 44 |
is implemented for ``PBKDF2PasswordHasher`` and ``BCryptPasswordHasher``. |
| 45 |
The number of rounds for the latter hasher hasn't changed since Django 1.4, but |
| 46 |
some projects may subclass it and increase the work factor as needed. |
| 47 |
|
| 48 |
A warning will be emitted for any :ref:`third-party password hashers that don't |
| 49 |
implement <write-your-own-password-hasher>` a ``harden_runtime()`` method. |
| 50 |
|
| 51 |
If you have different password hashes in your database (such as SHA1 hashes |
| 52 |
from users who haven't logged in since the default hasher switched to PBKDF2 |
| 53 |
in Django 1.4), the timing difference on a login request for these users may be |
| 54 |
even greater and this fix doesn't remedy that difference (or any difference |
| 55 |
when changing hashers). You may be able to :ref:`upgrade those hashes |
| 56 |
<wrapping-password-hashers>` to prevent a timing attack for that case. |
| 57 |
|
| 58 |
Bugfixes |
| 59 |
======== |
| 60 |
|
| 61 |
* Fixed a crash on PostgreSQL that prevented using ``TIME_ZONE=None`` and |
| 62 |
``USE_TZ=False`` (:ticket:`26177`). |
| 63 |
|
| 64 |
* Added system checks for query name clashes of hidden relationships |
| 65 |
(:ticket:`26162`). |
| 66 |
|
| 67 |
* Made ``forms.FileField`` and ``utils.translation.lazy_number()`` picklable |
| 68 |
(:ticket:`26212`). |
| 69 |
|
| 70 |
* Fixed :class:`~django.contrib.postgres.fields.RangeField` and |
| 71 |
:class:`~django.contrib.postgres.fields.ArrayField` serialization with |
| 72 |
``None`` values (:ticket:`26215`). |
| 73 |
|
| 74 |
* Reallowed dashes in top-level domain names of URLs checked by |
| 75 |
``URLValidator`` to fix a regression in Django 1.8 (:ticket:`26204`). |
| 76 |
|
| 77 |
* Fixed ``BoundField`` to reallow slices of subwidgets (:ticket:`26267`). |
| 78 |
|
| 79 |
* Prevented ``ContentTypeManager`` instances from sharing their cache |
| 80 |
(:ticket:`26286`). |