{"title":"Django 2.2.2 release notes","version":"dev","locale":"en","docname":"releases/2.2.2","url":"/en/dev/releases/2.2.2/","canonical":"https://djangodocs.dev/en/dev/releases/2.2.2/","summary":"Django 2.2.2 fixes security issues and several bugs in 2.2.1. The clickable “Current URL” link generated by AdminURLFieldWidget displayed the provided value…","html":"<h1>Django 2.2.2 release notes<a class=\"heading-anchor\" href=\"#django-2-2-2-release-notes\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h1>\n<p><em>June 3, 2019</em></p>\n<p>Django 2.2.2 fixes security issues and several bugs in 2.2.1.</p>\n<section id=\"cve-2019-12308-adminurlfieldwidget-xss\">\n<h2>CVE-2019-12308: AdminURLFieldWidget XSS<a class=\"heading-anchor\" href=\"#cve-2019-12308-adminurlfieldwidget-xss\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>The clickable “Current URL” link generated by <code class=\"docutils literal notranslate\">AdminURLFieldWidget</code> displayed\nthe provided value without validating it as a safe URL. Thus, an unvalidated\nvalue stored in the database, or a value provided as a URL query parameter\npayload, could result in an clickable JavaScript link.</p>\n<p><code class=\"docutils literal notranslate\">AdminURLFieldWidget</code> now validates the provided value using\n<a class=\"reference internal\" href=\"/en/dev/ref/validators/#django.core.validators.URLValidator\" title=\"django.core.validators.URLValidator\"><code class=\"xref py py-class docutils literal notranslate\">URLValidator</code></a> before displaying the clickable\nlink. You may customize the validator by passing a <code class=\"docutils literal notranslate\">validator_class</code> kwarg to\n<code class=\"docutils literal notranslate\">AdminURLFieldWidget.__init__()</code>, e.g. when using\n<a class=\"reference internal\" href=\"/en/dev/ref/contrib/admin/#django.contrib.admin.ModelAdmin.formfield_overrides\" title=\"django.contrib.admin.ModelAdmin.formfield_overrides\"><code class=\"xref py py-attr docutils literal notranslate\">formfield_overrides</code></a>.</p>\n</section>\n<section id=\"patched-bundled-jquery-for-cve-2019-11358-prototype-pollution\">\n<h2>Patched bundled jQuery for CVE-2019-11358: Prototype pollution<a class=\"heading-anchor\" href=\"#patched-bundled-jquery-for-cve-2019-11358-prototype-pollution\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>jQuery before 3.4.0, mishandles <code class=\"docutils literal notranslate\">jQuery.extend(true, {}, ...)</code> because of\n<code class=\"docutils literal notranslate\">Object.prototype</code> pollution. If an unsanitized source object contained an\nenumerable <code class=\"docutils literal notranslate\">__proto__</code> property, it could extend the native\n<code class=\"docutils literal notranslate\">Object.prototype</code>.</p>\n<p>The bundled version of jQuery used by the Django admin has been patched to\nallow for the <code class=\"docutils literal notranslate\">select2</code> library’s use of <code class=\"docutils literal notranslate\">jQuery.extend()</code>.</p>\n<section id=\"bugfixes\">\n<h3>Bugfixes<a class=\"heading-anchor\" href=\"#bugfixes\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<ul class=\"simple\">\n<li><p>Fixed a regression in Django 2.2 that stopped Show/Hide toggles working on\ndynamically added admin inlines (<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/30459\">#30459</a>).</p></li>\n<li><p>Fixed a regression in Django 2.2 where deprecation message crashes if\n<code class=\"docutils literal notranslate\">Meta.ordering</code> contains an expression (<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/30463\">#30463</a>).</p></li>\n<li><p>Fixed a regression in Django 2.2.1 where\n<a class=\"reference internal\" href=\"/en/dev/ref/contrib/postgres/search/#django.contrib.postgres.search.SearchVector\" title=\"django.contrib.postgres.search.SearchVector\"><code class=\"xref py py-class docutils literal notranslate\">SearchVector</code></a> generates SQL with a\nredundant <code class=\"docutils literal notranslate\">Coalesce</code> call (<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/30488\">#30488</a>).</p></li>\n<li><p>Fixed a regression in Django 2.2 where auto-reloader doesn’t detect changes\nin <code class=\"docutils literal notranslate\">manage.py</code> file when using <code class=\"docutils literal notranslate\">StatReloader</code> (<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/30479\">#30479</a>).</p></li>\n<li><p>Fixed crash of <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\">ordering</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/30315\">#30315</a>).</p></li>\n<li><p>Fixed a regression in Django 2.2 that caused a crash of auto-reloader when\nan exception with custom signature is raised (<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/30516\">#30516</a>).</p></li>\n<li><p>Fixed a regression in Django 2.2.1 where auto-reloader unnecessarily reloads\ntranslation files multiple times when using <code class=\"docutils literal notranslate\">StatReloader</code>\n(<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/30523\">#30523</a>).</p></li>\n</ul>\n</section>\n</section>","rootId":"django-2-2-2-release-notes","toc":[{"title":"CVE-2019-12308: AdminURLFieldWidget XSS","anchor":"cve-2019-12308-adminurlfieldwidget-xss","children":[]},{"title":"Patched bundled jQuery for CVE-2019-11358: Prototype pollution","anchor":"patched-bundled-jquery-for-cve-2019-11358-prototype-pollution","children":[{"title":"Bugfixes","anchor":"bugfixes","children":[]}]}],"breadcrumbs":[{"docname":"releases/index","title":"Release notes","url":"/en/dev/releases/"}],"prev":{"docname":"releases/2.2.3","title":"Django 2.2.3 release notes","url":"/en/dev/releases/2.2.3/"},"next":{"docname":"releases/2.2.1","title":"Django 2.2.1 release notes","url":"/en/dev/releases/2.2.1/"},"formats":{"html":"/en/dev/releases/2.2.2/","markdown":"/en/dev/releases/2.2.2.md","json":"/en/dev/releases/2.2.2.json"},"source":"https://github.com/django/django/blob/main/docs/releases/2.2.2.txt","official":"https://docs.djangoproject.com/en/dev/releases/2.2.2/","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"],"inLocales":["en"]}