{"title":"Django 5.1.1 release notes","version":"dev","locale":"en","docname":"releases/5.1.1","url":"/en/dev/releases/5.1.1/","canonical":"https://djangodocs.dev/en/dev/releases/5.1.1/","summary":"Django 5.1.1 fixes one security issue with severity “moderate”, one security issue with severity “low”, and several bugs in 5.1.","html":"<h1>Django 5.1.1 release notes<a class=\"heading-anchor\" href=\"#django-5-1-1-release-notes\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h1>\n<p><em>September 3, 2024</em></p>\n<p>Django 5.1.1 fixes one security issue with severity “moderate”, one security\nissue with severity “low”, and several bugs in 5.1.</p>\n<section id=\"cve-2024-45230-potential-denial-of-service-vulnerability-in-django-utils-html-urlize\">\n<h2>CVE-2024-45230: Potential denial-of-service vulnerability in <code class=\"docutils literal notranslate\">django.utils.html.urlize()</code><a class=\"heading-anchor\" href=\"#cve-2024-45230-potential-denial-of-service-vulnerability-in-django-utils-html-urlize\"><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/templates/builtins/#std-templatefilter-urlize\"><code class=\"xref std std-tfilter docutils literal notranslate\">urlize</code></a> and <a class=\"reference internal\" href=\"/en/dev/ref/templates/builtins/#std-templatefilter-urlizetrunc\"><code class=\"xref std std-tfilter docutils literal notranslate\">urlizetrunc</code></a> were subject to a potential\ndenial-of-service attack via very large inputs with a specific sequence of\ncharacters.</p>\n</section>\n<section id=\"cve-2024-45231-potential-user-email-enumeration-via-response-status-on-password-reset\">\n<h2>CVE-2024-45231: Potential user email enumeration via response status on password reset<a class=\"heading-anchor\" href=\"#cve-2024-45231-potential-user-email-enumeration-via-response-status-on-password-reset\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>Due to unhandled email sending failures, the\n<a class=\"reference internal\" href=\"/en/dev/topics/auth/default/#django.contrib.auth.forms.PasswordResetForm\" title=\"django.contrib.auth.forms.PasswordResetForm\"><code class=\"xref py py-class docutils literal notranslate\">PasswordResetForm</code></a> class allowed remote\nattackers to enumerate user emails by issuing password reset requests and\nobserving the outcomes.</p>\n<p>To mitigate this risk, exceptions occurring during password reset email sending\nare now handled and logged using the <a class=\"reference internal\" href=\"/en/dev/ref/logging/#django-contrib-auth-logger\"><span class=\"std std-ref\">django.contrib.auth</span></a> logger.</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 5.1 that caused a crash of <code class=\"docutils literal notranslate\">Window()</code> when\npassing an empty sequence to the <code class=\"docutils literal notranslate\">order_by</code> parameter, and a crash of\n<code class=\"docutils literal notranslate\">Prefetch()</code> for a sliced queryset without ordering (<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/35665\">#35665</a>).</p></li>\n<li><p>Fixed a regression in Django 5.1 where a new <code class=\"docutils literal notranslate\">usable_password</code> field was\nincluded in <a class=\"reference internal\" href=\"/en/dev/topics/auth/default/#django.contrib.auth.forms.BaseUserCreationForm\" title=\"django.contrib.auth.forms.BaseUserCreationForm\"><code class=\"xref py py-class docutils literal notranslate\">BaseUserCreationForm</code></a> (and\nchildren). A new <a class=\"reference internal\" href=\"/en/dev/topics/auth/default/#django.contrib.auth.forms.AdminUserCreationForm\" title=\"django.contrib.auth.forms.AdminUserCreationForm\"><code class=\"xref py py-class docutils literal notranslate\">AdminUserCreationForm</code></a>\nincluding this field was added, isolating the feature to the admin where it\nwas intended (<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/35678\">#35678</a>).</p></li>\n<li><p>Adjusted the deprecation warning <code class=\"docutils literal notranslate\">stacklevel</code> in <a class=\"reference internal\" href=\"/en/dev/ref/models/instances/#django.db.models.Model.save\" title=\"django.db.models.Model.save\"><code class=\"xref py py-meth docutils literal notranslate\">Model.save()</code></a> and\n<a class=\"reference internal\" href=\"/en/dev/ref/models/instances/#django.db.models.Model.asave\" title=\"django.db.models.Model.asave\"><code class=\"xref py py-meth docutils literal notranslate\">Model.asave()</code></a> to correctly point to the offending call site\n(<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/35060\">#35060</a>).</p></li>\n<li><p>Adjusted the deprecation warning <code class=\"docutils literal notranslate\">stacklevel</code> when using <code class=\"docutils literal notranslate\">OS_OPEN_FLAGS</code>\nin <a class=\"reference internal\" href=\"/en/dev/ref/files/storage/#django.core.files.storage.FileSystemStorage\" title=\"django.core.files.storage.FileSystemStorage\"><code class=\"xref py py-class docutils literal notranslate\">FileSystemStorage</code></a> to correctly point\nto the offending call site (<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/35326\">#35326</a>).</p></li>\n<li><p>Adjusted the deprecation warning <code class=\"docutils literal notranslate\">stacklevel</code> in\n<code class=\"docutils literal notranslate\">FieldCacheMixin.get_cache_name()</code> to correctly point to the offending call\nsite (<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/35405\">#35405</a>).</p></li>\n<li><p>Restored, following a regression in Django 5.1, the ability to override the\ntimezone and role setting behavior used within the <code class=\"docutils literal notranslate\">init_connection_state</code>\nmethod of the PostgreSQL backend (<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/35688\">#35688</a>).</p></li>\n<li><p>Fixed a bug in Django 5.1 where variable lookup errors were logged when\nrendering admin fieldsets (<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/35716\">#35716</a>).</p></li>\n</ul>\n</section>","rootId":"django-5-1-1-release-notes","toc":[{"title":"CVE-2024-45230: Potential denial-of-service vulnerability in django.utils.html.urlize()","anchor":"cve-2024-45230-potential-denial-of-service-vulnerability-in-django-utils-html-urlize","children":[]},{"title":"CVE-2024-45231: Potential user email enumeration via response status on password reset","anchor":"cve-2024-45231-potential-user-email-enumeration-via-response-status-on-password-reset","children":[]},{"title":"Bugfixes","anchor":"bugfixes","children":[]}],"breadcrumbs":[{"docname":"releases/index","title":"Release notes","url":"/en/dev/releases/"}],"prev":{"docname":"releases/5.1.2","title":"Django 5.1.2 release notes","url":"/en/dev/releases/5.1.2/"},"next":{"docname":"releases/5.1","title":"Django 5.1 release notes","url":"/en/dev/releases/5.1/"},"formats":{"html":"/en/dev/releases/5.1.1/","markdown":"/en/dev/releases/5.1.1.md","json":"/en/dev/releases/5.1.1.json"},"source":"https://github.com/django/django/blob/main/docs/releases/5.1.1.txt","official":"https://docs.djangoproject.com/en/dev/releases/5.1.1/","inVersions":["dev","6.1","6.0","5.2","5.1"],"inLocales":["en"]}