{"title":"Django 2.0.3 release notes","version":"dev","locale":"en","docname":"releases/2.0.3","url":"/en/dev/releases/2.0.3/","canonical":"https://djangodocs.dev/en/dev/releases/2.0.3/","summary":"Django 2.0.3 fixes two security issues and several bugs in 2.0.2. Also, the latest string translations from Transifex are incorporated.","html":"<h1>Django 2.0.3 release notes<a class=\"heading-anchor\" href=\"#django-2-0-3-release-notes\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h1>\n<p><em>March 6, 2018</em></p>\n<p>Django 2.0.3 fixes two security issues and several bugs in 2.0.2. Also, the\nlatest string translations from Transifex are incorporated.</p>\n<section id=\"cve-2018-7536-denial-of-service-possibility-in-urlize-and-urlizetrunc-template-filters\">\n<h2>CVE-2018-7536: Denial-of-service possibility in <code class=\"docutils literal notranslate\">urlize</code> and <code class=\"docutils literal notranslate\">urlizetrunc</code> template filters<a class=\"heading-anchor\" href=\"#cve-2018-7536-denial-of-service-possibility-in-urlize-and-urlizetrunc-template-filters\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>The <code class=\"docutils literal notranslate\">django.utils.html.urlize()</code> function was extremely slow to evaluate\ncertain inputs due to catastrophic backtracking vulnerabilities in two regular\nexpressions. The <code class=\"docutils literal notranslate\">urlize()</code> function is used to implement the <code class=\"docutils literal notranslate\">urlize</code> and\n<code class=\"docutils literal notranslate\">urlizetrunc</code> template filters, which were thus vulnerable.</p>\n<p>The problematic regular expressions are replaced with parsing logic that\nbehaves similarly.</p>\n</section>\n<section id=\"cve-2018-7537-denial-of-service-possibility-in-truncatechars-html-and-truncatewords-html-template-filters\">\n<h2>CVE-2018-7537: Denial-of-service possibility in <code class=\"docutils literal notranslate\">truncatechars_html</code> and <code class=\"docutils literal notranslate\">truncatewords_html</code> template filters<a class=\"heading-anchor\" href=\"#cve-2018-7537-denial-of-service-possibility-in-truncatechars-html-and-truncatewords-html-template-filters\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>If <code class=\"docutils literal notranslate\">django.utils.text.Truncator</code>’s <code class=\"docutils literal notranslate\">chars()</code> and <code class=\"docutils literal notranslate\">words()</code> methods were\npassed the <code class=\"docutils literal notranslate\">html=True</code> argument, they were extremely slow to evaluate certain\ninputs due to a catastrophic backtracking vulnerability in a regular\nexpression. The <code class=\"docutils literal notranslate\">chars()</code> and <code class=\"docutils literal notranslate\">words()</code> methods are used to implement the\n<code class=\"docutils literal notranslate\">truncatechars_html</code> and <code class=\"docutils literal notranslate\">truncatewords_html</code> template filters, which were\nthus vulnerable.</p>\n<p>The backtracking problem in the regular expression is fixed.</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 a regression that caused sliced <code class=\"docutils literal notranslate\">QuerySet.distinct().order_by()</code>\nfollowed by <code class=\"docutils literal notranslate\">count()</code> to crash (<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/29108\">#29108</a>).</p></li>\n<li><p>Prioritized the datetime and time input formats without <code class=\"docutils literal notranslate\">%f</code> for the Thai\nlocale to fix the admin time picker widget displaying “undefined”\n(<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/29109\">#29109</a>).</p></li>\n<li><p>Fixed crash with <code class=\"docutils literal notranslate\">QuerySet.order_by(Exists(...))</code> (<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/29118\">#29118</a>).</p></li>\n<li><p>Made <code class=\"docutils literal notranslate\">Q.deconstruct()</code> deterministic with multiple keyword arguments\n(<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/29125\">#29125</a>). You may need to modify <code class=\"docutils literal notranslate\">Q</code>’s in existing migrations, or\naccept an autogenerated migration.</p></li>\n<li><p>Fixed a regression where a <code class=\"docutils literal notranslate\">When()</code> expression with a list argument crashes\n(<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/29166\">#29166</a>).</p></li>\n<li><p>Fixed crash when using a <code class=\"docutils literal notranslate\">Window()</code> expression in a subquery\n(<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/29172\">#29172</a>).</p></li>\n<li><p>Fixed <code class=\"docutils literal notranslate\">AbstractBaseUser.normalize_username()</code> crash if the <code class=\"docutils literal notranslate\">username</code>\nargument isn’t a string (<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/29176\">#29176</a>).</p></li>\n</ul>\n</section>","rootId":"django-2-0-3-release-notes","toc":[{"title":"CVE-2018-7536: Denial-of-service possibility in urlize and urlizetrunc template filters","anchor":"cve-2018-7536-denial-of-service-possibility-in-urlize-and-urlizetrunc-template-filters","children":[]},{"title":"CVE-2018-7537: Denial-of-service possibility in truncatechars_html and truncatewords_html template filters","anchor":"cve-2018-7537-denial-of-service-possibility-in-truncatechars-html-and-truncatewords-html-template-filters","children":[]},{"title":"Bugfixes","anchor":"bugfixes","children":[]}],"breadcrumbs":[{"docname":"releases/index","title":"Release notes","url":"/en/dev/releases/"}],"prev":{"docname":"releases/2.0.4","title":"Django 2.0.4 release notes","url":"/en/dev/releases/2.0.4/"},"next":{"docname":"releases/2.0.2","title":"Django 2.0.2 release notes","url":"/en/dev/releases/2.0.2/"},"formats":{"html":"/en/dev/releases/2.0.3/","markdown":"/en/dev/releases/2.0.3.md","json":"/en/dev/releases/2.0.3.json"},"source":"https://github.com/django/django/blob/main/docs/releases/2.0.3.txt","official":"https://docs.djangoproject.com/en/dev/releases/2.0.3/","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"],"inLocales":["en"]}