{"title":"Django 1.6.5 release notes","version":"dev","locale":"en","docname":"releases/1.6.5","url":"/en/dev/releases/1.6.5/","canonical":"https://djangodocs.dev/en/dev/releases/1.6.5/","summary":"Django 1.6.5 fixes two security issues and several bugs in 1.6.4. In certain situations, Django may allow caches to store private data related to a…","html":"<h1>Django 1.6.5 release notes<a class=\"heading-anchor\" href=\"#django-1-6-5-release-notes\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h1>\n<p><em>May 14, 2014</em></p>\n<p>Django 1.6.5 fixes two security issues and several bugs in 1.6.4.</p>\n<section id=\"issue-caches-may-incorrectly-be-allowed-to-store-and-serve-private-data\">\n<h2>Issue: Caches may incorrectly be allowed to store and serve private data<a class=\"heading-anchor\" href=\"#issue-caches-may-incorrectly-be-allowed-to-store-and-serve-private-data\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>In certain situations, Django may allow caches to store private data\nrelated to a particular session and then serve that data to requests\nwith a different session, or no session at all. This can lead to\ninformation disclosure and can be a vector for cache poisoning.</p>\n<p>When using Django sessions, Django will set a <code class=\"docutils literal notranslate\">Vary: Cookie</code> header to\nensure caches do not serve cached data to requests from other sessions.\nHowever, older versions of Internet Explorer (most likely only Internet\nExplorer 6, and Internet Explorer 7 if run on Windows XP or Windows Server\n2003) are unable to handle the <code class=\"docutils literal notranslate\">Vary</code> header in combination with many content\ntypes. Therefore, Django would remove the header if the request was made by\nInternet Explorer.</p>\n<p>To remedy this, the special behavior for these older Internet Explorer versions\nhas been removed, and the <code class=\"docutils literal notranslate\">Vary</code> header is no longer stripped from the\nresponse. In addition, modifications to the <code class=\"docutils literal notranslate\">Cache-Control</code> header for all\nInternet Explorer requests with a <code class=\"docutils literal notranslate\">Content-Disposition</code> header have also been\nremoved as they were found to have similar issues.</p>\n</section>\n<section id=\"issue-malformed-redirect-urls-from-user-input-not-correctly-validated\">\n<h2>Issue: Malformed redirect URLs from user input not correctly validated<a class=\"heading-anchor\" href=\"#issue-malformed-redirect-urls-from-user-input-not-correctly-validated\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>The validation for redirects did not correctly validate some malformed URLs,\nwhich are accepted by some browsers. This allows a user to be redirected to\nan unsafe URL unexpectedly.</p>\n<p>Django relies on user input in some cases (e.g.\n<code class=\"docutils literal notranslate\">django.contrib.auth.views.login()</code>, <code class=\"docutils literal notranslate\">django.contrib.comments</code>, and\n<a class=\"reference internal\" href=\"/en/dev/topics/i18n/\"><span class=\"doc\">i18n</span></a>) to redirect the user to an “on success” URL.\nThe security checks for these redirects (namely\n<code class=\"docutils literal notranslate\">django.utils.http.is_safe_url()</code>) did not correctly validate some malformed\nURLs, such as <code class=\"docutils literal notranslate\">http:\\\\\\\\\\\\djangoproject.com</code>, which are accepted by some\nbrowsers with more liberal URL parsing.</p>\n<p>To remedy this, the validation in <code class=\"docutils literal notranslate\">is_safe_url()</code> has been tightened to be\nable to handle and correctly validate these malformed URLs.</p>\n</section>\n<section id=\"bugfixes\">\n<h2>Bugfixes<a class=\"heading-anchor\" href=\"#bugfixes\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<ul class=\"simple\">\n<li><p>Made the <code class=\"docutils literal notranslate\">year_lookup_bounds_for_datetime_field</code> Oracle backend method\nPython 3 compatible (<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/22551\">#22551</a>).</p></li>\n<li><p>Fixed <code class=\"docutils literal notranslate\">pgettext_lazy</code> crash when receiving bytestring content on Python 2\n(<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/22565\">#22565</a>).</p></li>\n<li><p>Fixed the SQL generated when filtering by a negated <code class=\"docutils literal notranslate\">Q</code> object that\ncontains a <code class=\"docutils literal notranslate\">F</code> object. (<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/22429\">#22429</a>).</p></li>\n<li><p>Avoided overwriting data fetched by <code class=\"docutils literal notranslate\">select_related()</code> in certain cases\nwhich could cause minor performance regressions\n(<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/22508\">#22508</a>).</p></li>\n</ul>\n</section>","rootId":"django-1-6-5-release-notes","toc":[{"title":"Issue: Caches may incorrectly be allowed to store and serve private data","anchor":"issue-caches-may-incorrectly-be-allowed-to-store-and-serve-private-data","children":[]},{"title":"Issue: Malformed redirect URLs from user input not correctly validated","anchor":"issue-malformed-redirect-urls-from-user-input-not-correctly-validated","children":[]},{"title":"Bugfixes","anchor":"bugfixes","children":[]}],"breadcrumbs":[{"docname":"releases/index","title":"Release notes","url":"/en/dev/releases/"}],"prev":{"docname":"releases/1.6.6","title":"Django 1.6.6 release notes","url":"/en/dev/releases/1.6.6/"},"next":{"docname":"releases/1.6.4","title":"Django 1.6.4 release notes","url":"/en/dev/releases/1.6.4/"},"formats":{"html":"/en/dev/releases/1.6.5/","markdown":"/en/dev/releases/1.6.5.md","json":"/en/dev/releases/1.6.5.json"},"source":"https://github.com/django/django/blob/main/docs/releases/1.6.5.txt","official":"https://docs.djangoproject.com/en/dev/releases/1.6.5/","inVersions":["dev","6.1","6.0","5.2","5.1","5.0","4.2","4.1","4.0","3.2","3.1","3.0","2.2","2.1","2.0","1.11","1.10","1.9","1.8"],"inLocales":["en"]}