{"title":"Django 3.0.3 release notes","version":"dev","locale":"en","docname":"releases/3.0.3","url":"/en/dev/releases/3.0.3/","canonical":"https://djangodocs.dev/en/dev/releases/3.0.3/","summary":"Django 3.0.3 fixes a security issue and several bugs in 3.0.2. StringAgg aggregation function was subject to SQL injection, using a suitably crafted…","html":"<h1>Django 3.0.3 release notes<a class=\"heading-anchor\" href=\"#django-3-0-3-release-notes\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h1>\n<p><em>February 3, 2020</em></p>\n<p>Django 3.0.3 fixes a security issue and several bugs in 3.0.2.</p>\n<section id=\"cve-2020-7471-potential-sql-injection-via-stringagg-delimiter\">\n<h2>CVE-2020-7471: Potential SQL injection via <code class=\"docutils literal notranslate\">StringAgg(delimiter)</code><a class=\"heading-anchor\" href=\"#cve-2020-7471-potential-sql-injection-via-stringagg-delimiter\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<p><a class=\"reference internal\" href=\"/en/dev/ref/contrib/postgres/aggregates/#django.contrib.postgres.aggregates.StringAgg\" title=\"django.contrib.postgres.aggregates.StringAgg\"><code class=\"xref py py-class docutils literal notranslate\">StringAgg</code></a> aggregation function was\nsubject to SQL injection, using a suitably crafted <code class=\"docutils literal notranslate\">delimiter</code>.</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 in Django 3.0 that caused a crash when subtracting\n<code class=\"docutils literal notranslate\">DateField</code>, <code class=\"docutils literal notranslate\">DateTimeField</code>, or <code class=\"docutils literal notranslate\">TimeField</code> from a <code class=\"docutils literal notranslate\">Subquery()</code>\nannotation (<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/31133\">#31133</a>).</p></li>\n<li><p>Fixed a regression in Django 3.0 where <code class=\"docutils literal notranslate\">QuerySet.values()</code> and\n<code class=\"docutils literal notranslate\">values_list()</code> crashed if a queryset contained an aggregation and\n<code class=\"docutils literal notranslate\">Exists()</code> annotation (<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/31136\">#31136</a>).</p></li>\n<li><p>Relaxed the system check added in Django 3.0 to reallow use of a sublanguage\nin the <a class=\"reference internal\" href=\"/en/dev/ref/settings/#std-setting-LANGUAGE_CODE\"><code class=\"xref std std-setting docutils literal notranslate\">LANGUAGE_CODE</code></a> setting, when a base language is available in\nDjango but the sublanguage is not (<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/31141\">#31141</a>).</p></li>\n<li><p>Added support for using enumeration types <code class=\"docutils literal notranslate\">TextChoices</code>,\n<code class=\"docutils literal notranslate\">IntegerChoices</code>, and <code class=\"docutils literal notranslate\">Choices</code> in templates (<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/31154\">#31154</a>).</p></li>\n<li><p>Fixed a system check to ensure the <code class=\"docutils literal notranslate\">max_length</code> attribute fits the longest\nchoice, when a named group contains only non-string values (<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/31155\">#31155</a>).</p></li>\n<li><p>Fixed a regression in Django 2.2 that caused a crash of\n<a class=\"reference internal\" href=\"/en/dev/ref/contrib/postgres/aggregates/#django.contrib.postgres.aggregates.ArrayAgg\" title=\"django.contrib.postgres.aggregates.ArrayAgg\"><code class=\"xref py py-class docutils literal notranslate\">ArrayAgg</code></a> and\n<a class=\"reference internal\" href=\"/en/dev/ref/contrib/postgres/aggregates/#django.contrib.postgres.aggregates.StringAgg\" title=\"django.contrib.postgres.aggregates.StringAgg\"><code class=\"xref py py-class docutils literal notranslate\">StringAgg</code></a> with <code class=\"docutils literal notranslate\">filter</code>\nargument when used in a <code class=\"docutils literal notranslate\">Subquery</code> (<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/31097\">#31097</a>).</p></li>\n<li><p>Fixed a regression in Django 2.2.7 that caused\n<a class=\"reference internal\" href=\"/en/dev/ref/models/instances/#django.db.models.Model.get_FOO_display\" title=\"django.db.models.Model.get_FOO_display\"><code class=\"xref py py-meth docutils literal notranslate\">get_FOO_display()</code></a> to work incorrectly when\noverriding inherited choices (<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/31124\">#31124</a>).</p></li>\n<li><p>Fixed a regression in Django 3.0 that caused a crash of\n<code class=\"docutils literal notranslate\">QuerySet.prefetch_related()</code> for <code class=\"docutils literal notranslate\">GenericForeignKey</code> with a custom\n<code class=\"docutils literal notranslate\">ContentType</code> foreign key (<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/31190\">#31190</a>).</p></li>\n</ul>\n</section>","rootId":"django-3-0-3-release-notes","toc":[{"title":"CVE-2020-7471: Potential SQL injection via StringAgg(delimiter)","anchor":"cve-2020-7471-potential-sql-injection-via-stringagg-delimiter","children":[]},{"title":"Bugfixes","anchor":"bugfixes","children":[]}],"breadcrumbs":[{"docname":"releases/index","title":"Release notes","url":"/en/dev/releases/"}],"prev":{"docname":"releases/3.0.4","title":"Django 3.0.4 release notes","url":"/en/dev/releases/3.0.4/"},"next":{"docname":"releases/3.0.2","title":"Django 3.0.2 release notes","url":"/en/dev/releases/3.0.2/"},"formats":{"html":"/en/dev/releases/3.0.3/","markdown":"/en/dev/releases/3.0.3.md","json":"/en/dev/releases/3.0.3.json"},"source":"https://github.com/django/django/blob/main/docs/releases/3.0.3.txt","official":"https://docs.djangoproject.com/en/dev/releases/3.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"],"inLocales":["en"]}