{"title":"Django 1.10.3 release notes","version":"dev","locale":"en","docname":"releases/1.10.3","url":"/en/dev/releases/1.10.3/","canonical":"https://djangodocs.dev/en/dev/releases/1.10.3/","summary":"Django 1.10.3 fixes two security issues and several bugs in 1.10.2. When running tests with an Oracle database, Django creates a temporary database user.","html":"<h1>Django 1.10.3 release notes<a class=\"heading-anchor\" href=\"#django-1-10-3-release-notes\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h1>\n<p><em>November 1, 2016</em></p>\n<p>Django 1.10.3 fixes two security issues and several bugs in 1.10.2.</p>\n<section id=\"user-with-hardcoded-password-created-when-running-tests-on-oracle\">\n<h2>User with hardcoded password created when running tests on Oracle<a class=\"heading-anchor\" href=\"#user-with-hardcoded-password-created-when-running-tests-on-oracle\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>When running tests with an Oracle database, Django creates a temporary database\nuser. In older versions, if a password isn’t manually specified in the database\nsettings <code class=\"docutils literal notranslate\">TEST</code> dictionary, a hardcoded password is used. This could allow\nan attacker with network access to the database server to connect.</p>\n<p>This user is usually dropped after the test suite completes, but not when using\nthe <code class=\"docutils literal notranslate\">manage.py test --keepdb</code> option or if the user has an active session\n(such as an attacker’s connection).</p>\n<p>A randomly generated password is now used for each test run.</p>\n</section>\n<section id=\"dns-rebinding-vulnerability-when-debug-true\">\n<h2>DNS rebinding vulnerability when <code class=\"docutils literal notranslate\">DEBUG=True</code><a class=\"heading-anchor\" href=\"#dns-rebinding-vulnerability-when-debug-true\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>Older versions of Django don’t validate the <code class=\"docutils literal notranslate\">Host</code> header against\n<code class=\"docutils literal notranslate\">settings.ALLOWED_HOSTS</code> when <code class=\"docutils literal notranslate\">settings.DEBUG=True</code>. This makes them\nvulnerable to a <a class=\"reference external\" href=\"https://benmmurphy.github.io/blog/2016/07/11/rails-webconsole-dns-rebinding/\">DNS rebinding attack</a>.</p>\n<p>While Django doesn’t ship a module that allows remote code execution, this is\nat least a cross-site scripting vector, which could be quite serious if\ndevelopers load a copy of the production database in development or connect to\nsome production services for which there’s no development instance, for\nexample. If a project uses a package like the <code class=\"docutils literal notranslate\">django-debug-toolbar</code>, then\nthe attacker could execute arbitrary SQL, which could be especially bad if the\ndevelopers connect to the database with a superuser account.</p>\n<p><code class=\"docutils literal notranslate\">settings.ALLOWED_HOSTS</code> is now validated regardless of <code class=\"docutils literal notranslate\">DEBUG</code>. For\nconvenience, if <code class=\"docutils literal notranslate\">ALLOWED_HOSTS</code> is empty and <code class=\"docutils literal notranslate\">DEBUG=True</code>, the following\nvariations of localhost are allowed <code class=\"docutils literal notranslate\">['localhost', '127.0.0.1', '::1']</code>. If\nyour local settings file has your production <code class=\"docutils literal notranslate\">ALLOWED_HOSTS</code> value, you must\nnow omit it to get those fallback values.</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>Allowed <code class=\"docutils literal notranslate\">User.is_authenticated</code> and <code class=\"docutils literal notranslate\">User.is_anonymous</code> properties to be\ntested for <code class=\"docutils literal notranslate\">set</code> membership (<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/27309\">#27309</a>).</p></li>\n<li><p>Fixed a performance regression when running <code class=\"docutils literal notranslate\">migrate</code> in projects\nwith <code class=\"docutils literal notranslate\">RenameModel</code> operations (<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/27279\">#27279</a>).</p></li>\n<li><p>Added <code class=\"docutils literal notranslate\">model_name</code> to the <code class=\"docutils literal notranslate\">allow_migrate()</code> calls in <code class=\"docutils literal notranslate\">makemigrations</code>\n(<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/27200\">#27200</a>).</p></li>\n<li><p>Made the <code class=\"docutils literal notranslate\">JavaScriptCatalog</code> view respect the <code class=\"docutils literal notranslate\">packages</code> argument;\npreviously it was ignored (<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/27374\">#27374</a>).</p></li>\n<li><p>Fixed <code class=\"docutils literal notranslate\">QuerySet.bulk_create()</code> on PostgreSQL when the number of objects is\na multiple plus one of <code class=\"docutils literal notranslate\">batch_size</code> (<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/27385\">#27385</a>).</p></li>\n<li><p>Prevented <code class=\"docutils literal notranslate\">i18n_patterns()</code> from using too much of the URL as the language\nto fix a use case for <code class=\"docutils literal notranslate\">prefix_default_language=False</code> (<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/27063\">#27063</a>).</p></li>\n<li><p>Replaced a possibly incorrect redirect from <code class=\"docutils literal notranslate\">SessionMiddleware</code> when a\nsession is destroyed in a concurrent request with a <code class=\"docutils literal notranslate\">SuspiciousOperation</code>\nto indicate that the request can’t be completed (<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/27363\">#27363</a>).</p></li>\n</ul>\n</section>","rootId":"django-1-10-3-release-notes","toc":[{"title":"User with hardcoded password created when running tests on Oracle","anchor":"user-with-hardcoded-password-created-when-running-tests-on-oracle","children":[]},{"title":"DNS rebinding vulnerability when DEBUG=True","anchor":"dns-rebinding-vulnerability-when-debug-true","children":[]},{"title":"Bugfixes","anchor":"bugfixes","children":[]}],"breadcrumbs":[{"docname":"releases/index","title":"Release notes","url":"/en/dev/releases/"}],"prev":{"docname":"releases/1.10.4","title":"Django 1.10.4 release notes","url":"/en/dev/releases/1.10.4/"},"next":{"docname":"releases/1.10.2","title":"Django 1.10.2 release notes","url":"/en/dev/releases/1.10.2/"},"formats":{"html":"/en/dev/releases/1.10.3/","markdown":"/en/dev/releases/1.10.3.md","json":"/en/dev/releases/1.10.3.json"},"source":"https://github.com/django/django/blob/main/docs/releases/1.10.3.txt","official":"https://docs.djangoproject.com/en/dev/releases/1.10.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","1.11","1.10"],"inLocales":["en"]}