{"title":"Django 1.4.6 release notes","version":"dev","locale":"en","docname":"releases/1.4.6","url":"/en/dev/releases/1.4.6/","canonical":"https://djangodocs.dev/en/dev/releases/1.4.6/","summary":"Django 1.4.6 fixes one security issue present in previous Django releases in the 1.4 series, as well as one other bug.","html":"<h1>Django 1.4.6 release notes<a class=\"heading-anchor\" href=\"#django-1-4-6-release-notes\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h1>\n<p><em>August 13, 2013</em></p>\n<p>Django 1.4.6 fixes one security issue present in previous Django releases in\nthe 1.4 series, as well as one other bug.</p>\n<p>This is the sixth bugfix/security release in the Django 1.4 series.</p>\n<section id=\"mitigated-possible-xss-attack-via-user-supplied-redirect-urls\">\n<h2>Mitigated possible XSS attack via user-supplied redirect URLs<a class=\"heading-anchor\" href=\"#mitigated-possible-xss-attack-via-user-supplied-redirect-urls\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\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>) didn’t check if the scheme is <code class=\"docutils literal notranslate\">http(s)</code>\nand as such allowed <code class=\"docutils literal notranslate\">javascript:...</code> URLs to be entered. If a developer\nrelied on <code class=\"docutils literal notranslate\">is_safe_url()</code> to provide safe redirect targets and put such a\nURL into a link, they could suffer from a XSS attack. This bug doesn’t affect\nDjango currently, since we only put this URL into the <code class=\"docutils literal notranslate\">Location</code> response\nheader and browsers seem to ignore JavaScript there.</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>Fixed an obscure bug with the <a class=\"reference internal\" href=\"/en/dev/topics/testing/tools/#django.test.override_settings\" title=\"django.test.override_settings\"><code class=\"xref py py-func docutils literal notranslate\">override_settings()</code></a>\ndecorator. If you hit an <code class=\"docutils literal notranslate\">AttributeError: 'Settings' object has no attribute\n'_original_allowed_hosts'</code> exception, it’s probably fixed (#20636).</p></li>\n</ul>\n</section>","rootId":"django-1-4-6-release-notes","toc":[{"title":"Mitigated possible XSS attack via user-supplied redirect URLs","anchor":"mitigated-possible-xss-attack-via-user-supplied-redirect-urls","children":[]},{"title":"Bugfixes","anchor":"bugfixes","children":[]}],"breadcrumbs":[{"docname":"releases/index","title":"Release notes","url":"/en/dev/releases/"}],"prev":{"docname":"releases/1.4.7","title":"Django 1.4.7 release notes","url":"/en/dev/releases/1.4.7/"},"next":{"docname":"releases/1.4.5","title":"Django 1.4.5 release notes","url":"/en/dev/releases/1.4.5/"},"formats":{"html":"/en/dev/releases/1.4.6/","markdown":"/en/dev/releases/1.4.6.md","json":"/en/dev/releases/1.4.6.json"},"source":"https://github.com/django/django/blob/main/docs/releases/1.4.6.txt","official":"https://docs.djangoproject.com/en/dev/releases/1.4.6/","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"]}