{"title":"Django 2.1.10 release notes","version":"dev","locale":"en","docname":"releases/2.1.10","url":"/en/dev/releases/2.1.10/","canonical":"https://djangodocs.dev/en/dev/releases/2.1.10/","summary":"Django 2.1.10 fixes a security issue in 2.1.9. When deployed behind a reverse-proxy connecting to Django via HTTPS, django.http.HttpRequest.scheme would…","html":"<h1>Django 2.1.10 release notes<a class=\"heading-anchor\" href=\"#django-2-1-10-release-notes\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h1>\n<p><em>July 1, 2019</em></p>\n<p>Django 2.1.10 fixes a security issue in 2.1.9.</p>\n<section id=\"cve-2019-12781-incorrect-http-detection-with-reverse-proxy-connecting-via-https\">\n<h2>CVE-2019-12781: Incorrect HTTP detection with reverse-proxy connecting via HTTPS<a class=\"heading-anchor\" href=\"#cve-2019-12781-incorrect-http-detection-with-reverse-proxy-connecting-via-https\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>When deployed behind a reverse-proxy connecting to Django via HTTPS,\n<a class=\"reference internal\" href=\"/en/dev/ref/request-response/#django.http.HttpRequest.scheme\" title=\"django.http.HttpRequest.scheme\"><code class=\"xref py py-attr docutils literal notranslate\">django.http.HttpRequest.scheme</code></a> would incorrectly detect client\nrequests made via HTTP as using HTTPS. This entails incorrect results for\n<a class=\"reference internal\" href=\"/en/dev/ref/request-response/#django.http.HttpRequest.is_secure\" title=\"django.http.HttpRequest.is_secure\"><code class=\"xref py py-meth docutils literal notranslate\">is_secure()</code></a>, and\n<a class=\"reference internal\" href=\"/en/dev/ref/request-response/#django.http.HttpRequest.build_absolute_uri\" title=\"django.http.HttpRequest.build_absolute_uri\"><code class=\"xref py py-meth docutils literal notranslate\">build_absolute_uri()</code></a>, and that HTTP\nrequests would not be redirected to HTTPS in accordance with\n<a class=\"reference internal\" href=\"/en/dev/ref/settings/#std-setting-SECURE_SSL_REDIRECT\"><code class=\"xref std std-setting docutils literal notranslate\">SECURE_SSL_REDIRECT</code></a>.</p>\n<p><code class=\"docutils literal notranslate\">HttpRequest.scheme</code> now respects <a class=\"reference internal\" href=\"/en/dev/ref/settings/#std-setting-SECURE_PROXY_SSL_HEADER\"><code class=\"xref std std-setting docutils literal notranslate\">SECURE_PROXY_SSL_HEADER</code></a>, if it\nis configured, and the appropriate header is set on the request, for both HTTP\nand HTTPS requests.</p>\n<p>If you deploy Django behind a reverse-proxy that forwards HTTP requests, and\nthat connects to Django via HTTPS, be sure to verify that your application\ncorrectly handles code paths relying on <code class=\"docutils literal notranslate\">scheme</code>, <code class=\"docutils literal notranslate\">is_secure()</code>,\n<code class=\"docutils literal notranslate\">build_absolute_uri()</code>, and <code class=\"docutils literal notranslate\">SECURE_SSL_REDIRECT</code>.</p>\n</section>","rootId":"django-2-1-10-release-notes","toc":[{"title":"CVE-2019-12781: Incorrect HTTP detection with reverse-proxy connecting via HTTPS","anchor":"cve-2019-12781-incorrect-http-detection-with-reverse-proxy-connecting-via-https","children":[]}],"breadcrumbs":[{"docname":"releases/index","title":"Release notes","url":"/en/dev/releases/"}],"prev":{"docname":"releases/2.1.11","title":"Django 2.1.11 release notes","url":"/en/dev/releases/2.1.11/"},"next":{"docname":"releases/2.1.9","title":"Django 2.1.9 release notes","url":"/en/dev/releases/2.1.9/"},"formats":{"html":"/en/dev/releases/2.1.10/","markdown":"/en/dev/releases/2.1.10.md","json":"/en/dev/releases/2.1.10.json"},"source":"https://github.com/django/django/blob/main/docs/releases/2.1.10.txt","official":"https://docs.djangoproject.com/en/dev/releases/2.1.10/","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"],"inLocales":["en"]}