1.5.8.txt 2.22 KB
Newer Older
1 2 3 4
==========================
Django 1.5.8 release notes
==========================

5
*May 14, 2014*
6

7
Django 1.5.8 fixes two security issues in 1.5.8.
8 9 10

Caches may incorrectly be allowed to store and serve private data
=================================================================
11

12 13
In certain situations, Django may allow caches to store private data
related to a particular session and then serve that data to requests
14 15
with a different session, or no session at all. This can lead to
information disclosure and can be a vector for cache poisoning.
16 17 18 19 20 21 22 23 24

When using Django sessions, Django will set a ``Vary: Cookie`` header to
ensure caches do not serve cached data to requests from other sessions.
However, older versions of Internet Explorer (most likely only Internet
Explorer 6, and Internet Explorer 7 if run on Windows XP or Windows Server
2003) are unable to handle the ``Vary`` header in combination with many content
types. Therefore, Django would remove the header if the request was made by
Internet Explorer.

25
To remedy this, the special behavior for these older Internet Explorer versions
26 27
has been removed, and the ``Vary`` header is no longer stripped from the response.
In addition, modifications to the ``Cache-Control`` header for all Internet Explorer
28
requests with a ``Content-Disposition`` header have also been removed as they
29 30 31 32
were found to have similar issues.

Malformed redirect URLs from user input not correctly validated
===============================================================
33

34 35 36 37 38 39 40 41
The validation for redirects did not correctly validate some malformed URLs,
which are accepted by some browsers. This allows a user to be redirected to
an unsafe URL unexpectedly.

Django relies on user input in some cases (e.g.
:func:`django.contrib.auth.views.login`, ``django.contrib.comments``, and
:doc:`i18n </topics/i18n/index>`) to redirect the user to an "on success" URL.
The security checks for these redirects (namely
42
``django.utils.http.is_safe_url()``) did not correctly validate some malformed
43 44 45 46 47
URLs, such as `http:\\\\\\djangoproject.com`, which are accepted by some browsers
with more liberal URL parsing.

To remedy this, the validation in ``is_safe_url()`` has been tightened to be able
to handle and correctly validate these malformed URLs.