{"title":"Django 5.0.2 release notes","version":"dev","locale":"en","docname":"releases/5.0.2","url":"/en/dev/releases/5.0.2/","canonical":"https://djangodocs.dev/en/dev/releases/5.0.2/","summary":"Django 5.0.2 fixes a security issue with severity “moderate” and several bugs in 5.0.1. Also, the latest string translations from Transifex are incorporated.","html":"<h1>Django 5.0.2 release notes<a class=\"heading-anchor\" href=\"#django-5-0-2-release-notes\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h1>\n<p><em>February 6, 2024</em></p>\n<p>Django 5.0.2 fixes a security issue with severity “moderate” and several bugs\nin 5.0.1. Also, the latest string translations from Transifex are incorporated.</p>\n<section id=\"cve-2024-24680-potential-denial-of-service-in-intcomma-template-filter\">\n<h2>CVE-2024-24680: Potential denial-of-service in <code class=\"docutils literal notranslate\">intcomma</code> template filter<a class=\"heading-anchor\" href=\"#cve-2024-24680-potential-denial-of-service-in-intcomma-template-filter\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>The <code class=\"docutils literal notranslate\">intcomma</code> template filter was subject to a potential denial-of-service\nattack when used with very long strings.</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>Reallowed, following a regression in Django 5.0.1, filtering against local\nforeign keys not included in <a class=\"reference internal\" href=\"/en/dev/ref/contrib/admin/#django.contrib.admin.ModelAdmin.list_filter\" title=\"django.contrib.admin.ModelAdmin.list_filter\"><code class=\"xref py py-attr docutils literal notranslate\">ModelAdmin.list_filter</code></a>\n(<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/35087\">#35087</a>).</p></li>\n<li><p>Fixed a regression in Django 5.0 where links in the admin had an incorrect\ncolor (<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/35121\">#35121</a>).</p></li>\n<li><p>Fixed a bug in Django 5.0 that caused a crash of <code class=\"docutils literal notranslate\">Model.full_clean()</code> on\nmodels with a <code class=\"docutils literal notranslate\">GeneratedField</code> (<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/35127\">#35127</a>).</p></li>\n<li><p>Fixed a regression in Django 5.0 that caused a crash of\n<code class=\"docutils literal notranslate\">FilteredRelation()</code> with querysets as right-hand sides (<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/35135\">#35135</a>).\n<code class=\"docutils literal notranslate\">FilteredRelation()</code> now raises a <code class=\"docutils literal notranslate\">ValueError</code> on querysets as right-hand\nsides.</p></li>\n<li><p>Fixed a regression in Django 5.0 that caused a crash of the <code class=\"docutils literal notranslate\">dumpdata</code>\nmanagement command when a base queryset used <code class=\"docutils literal notranslate\">prefetch_related()</code>\n(<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/35159\">#35159</a>).</p></li>\n<li><p>Fixed a regression in Django 5.0 that caused the <code class=\"docutils literal notranslate\">request_finished</code> signal\nto sometimes not be fired when running Django through an ASGI server,\nresulting in potential resource leaks (<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/35059\">#35059</a>).</p></li>\n<li><p>Fixed a bug in Django 5.0 that caused a migration crash on MySQL when adding\na <code class=\"docutils literal notranslate\">BinaryField</code>, <code class=\"docutils literal notranslate\">TextField</code>, <code class=\"docutils literal notranslate\">JSONField</code>, or <code class=\"docutils literal notranslate\">GeometryField</code> with a\n<code class=\"docutils literal notranslate\">db_default</code> (<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/35162\">#35162</a>).</p></li>\n<li><p>Fixed a bug in Django 5.0 that caused a migration crash on models with a\nliteral <code class=\"docutils literal notranslate\">db_default</code> of a complex type such as <code class=\"docutils literal notranslate\">dict</code> instance of a\n<code class=\"docutils literal notranslate\">JSONField</code>. Running <code class=\"docutils literal notranslate\">makemigrations</code> might generate no-op <code class=\"docutils literal notranslate\">AlterField</code>\noperations for fields using <code class=\"docutils literal notranslate\">db_default</code> (<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/35149\">#35149</a>).</p></li>\n</ul>\n</section>","rootId":"django-5-0-2-release-notes","toc":[{"title":"CVE-2024-24680: Potential denial-of-service in intcomma template filter","anchor":"cve-2024-24680-potential-denial-of-service-in-intcomma-template-filter","children":[]},{"title":"Bugfixes","anchor":"bugfixes","children":[]}],"breadcrumbs":[{"docname":"releases/index","title":"Release notes","url":"/en/dev/releases/"}],"prev":{"docname":"releases/5.0.3","title":"Django 5.0.3 release notes","url":"/en/dev/releases/5.0.3/"},"next":{"docname":"releases/5.0.1","title":"Django 5.0.1 release notes","url":"/en/dev/releases/5.0.1/"},"formats":{"html":"/en/dev/releases/5.0.2/","markdown":"/en/dev/releases/5.0.2.md","json":"/en/dev/releases/5.0.2.json"},"source":"https://github.com/django/django/blob/main/docs/releases/5.0.2.txt","official":"https://docs.djangoproject.com/en/dev/releases/5.0.2/","inVersions":["dev","6.1","6.0","5.2","5.1","5.0"],"inLocales":["en"]}