{"title":"Django 1.3.4 release notes","version":"dev","locale":"en","docname":"releases/1.3.4","url":"/en/dev/releases/1.3.4/","canonical":"https://djangodocs.dev/en/dev/releases/1.3.4/","summary":"This is the fourth release in the Django 1.3 series. Some parts of Django – independent of end-user-written applications – make use of full URLs, including…","html":"<h1>Django 1.3.4 release notes<a class=\"heading-anchor\" href=\"#django-1-3-4-release-notes\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h1>\n<p><em>October 17, 2012</em></p>\n<p>This is the fourth release in the Django 1.3 series.</p>\n<section id=\"host-header-poisoning\">\n<h2>Host header poisoning<a class=\"heading-anchor\" href=\"#host-header-poisoning\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>Some parts of Django – independent of end-user-written applications – make\nuse of full URLs, including domain name, which are generated from the HTTP Host\nheader. Some attacks against this are beyond Django’s ability to control, and\nrequire the web server to be properly configured; Django’s documentation has\nfor some time contained notes advising users on such configuration.</p>\n<p>Django’s own built-in parsing of the Host header is, however, still vulnerable,\nas was reported to us recently. The Host header parsing in Django 1.3.3 and\nDjango 1.4.1 – specifically, <code class=\"docutils literal notranslate\">django.http.HttpRequest.get_host()</code> – was\nincorrectly handling username/password information in the header. Thus, for\nexample, the following Host header would be accepted by Django when running on\n<code class=\"docutils literal notranslate\">validsite.com</code>:</p>\n<div class=\"code-block\" data-language=\"text\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Text</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Text code\"><code>Host: validsite.com:random@evilsite.com\n</code></pre></div>\n<p>Using this, an attacker can cause parts of Django – particularly the\npassword-reset mechanism – to generate and display arbitrary URLs to users.</p>\n<p>To remedy this, the parsing in <code class=\"docutils literal notranslate\">HttpRequest.get_host()</code> is being modified;\nHost headers which contain potentially dangerous content (such as\nusername/password pairs) now raise the exception\n<a class=\"reference internal\" href=\"/en/dev/ref/exceptions/#django.core.exceptions.SuspiciousOperation\" title=\"django.core.exceptions.SuspiciousOperation\"><code class=\"xref py py-exc docutils literal notranslate\">django.core.exceptions.SuspiciousOperation</code></a>.</p>\n<p>Details of this issue were initially posted online as a <a class=\"reference external\" href=\"https://www.djangoproject.com/weblog/2012/oct/17/security/\">security advisory</a>.</p>\n</section>","rootId":"django-1-3-4-release-notes","toc":[{"title":"Host header poisoning","anchor":"host-header-poisoning","children":[]}],"breadcrumbs":[{"docname":"releases/index","title":"Release notes","url":"/en/dev/releases/"}],"prev":{"docname":"releases/1.3.5","title":"Django 1.3.5 release notes","url":"/en/dev/releases/1.3.5/"},"next":{"docname":"releases/1.3.3","title":"Django 1.3.3 release notes","url":"/en/dev/releases/1.3.3/"},"formats":{"html":"/en/dev/releases/1.3.4/","markdown":"/en/dev/releases/1.3.4.md","json":"/en/dev/releases/1.3.4.json"},"source":"https://github.com/django/django/blob/main/docs/releases/1.3.4.txt","official":"https://docs.djangoproject.com/en/dev/releases/1.3.4/","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"]}