Sophie

Sophie

distrib > Mageia > 6 > armv7hl > media > core-updates > by-pkgid > 65530c6176058f9b54858c3b4f6385e6 > files > 879

python-django-doc-1.8.19-1.mga6.noarch.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


<html xmlns="http://www.w3.org/1999/xhtml" lang="">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
    <title>Django 1.7.3 release notes &#8212; Django 1.8.19 documentation</title>
    
    <link rel="stylesheet" href="../_static/default.css" type="text/css" />
    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
    
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    '../',
        VERSION:     '1.8.19',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true
      };
    </script>
    <script type="text/javascript" src="../_static/jquery.js"></script>
    <script type="text/javascript" src="../_static/underscore.js"></script>
    <script type="text/javascript" src="../_static/doctools.js"></script>
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="top" title="Django 1.8.19 documentation" href="../contents.html" />
    <link rel="up" title="Release notes" href="index.html" />
    <link rel="next" title="Django 1.7.2 release notes" href="1.7.2.html" />
    <link rel="prev" title="Django 1.7.4 release notes" href="1.7.4.html" />



 
<script type="text/javascript" src="../templatebuiltins.js"></script>
<script type="text/javascript">
(function($) {
    if (!django_template_builtins) {
       // templatebuiltins.js missing, do nothing.
       return;
    }
    $(document).ready(function() {
        // Hyperlink Django template tags and filters
        var base = "../ref/templates/builtins.html";
        if (base == "#") {
            // Special case for builtins.html itself
            base = "";
        }
        // Tags are keywords, class '.k'
        $("div.highlight\\-html\\+django span.k").each(function(i, elem) {
             var tagname = $(elem).text();
             if ($.inArray(tagname, django_template_builtins.ttags) != -1) {
                 var fragment = tagname.replace(/_/, '-');
                 $(elem).html("<a href='" + base + "#" + fragment + "'>" + tagname + "</a>");
             }
        });
        // Filters are functions, class '.nf'
        $("div.highlight\\-html\\+django span.nf").each(function(i, elem) {
             var filtername = $(elem).text();
             if ($.inArray(filtername, django_template_builtins.tfilters) != -1) {
                 var fragment = filtername.replace(/_/, '-');
                 $(elem).html("<a href='" + base + "#" + fragment + "'>" + filtername + "</a>");
             }
        });
    });
})(jQuery);
</script>


  </head>
  <body role="document">

    <div class="document">
  <div id="custom-doc" class="yui-t6">
    <div id="hd">
      <h1><a href="../index.html">Django 1.8.19 documentation</a></h1>
      <div id="global-nav">
        <a title="Home page" href="../index.html">Home</a>  |
        <a title="Table of contents" href="../contents.html">Table of contents</a>  |
        <a title="Global index" href="../genindex.html">Index</a>  |
        <a title="Module index" href="../py-modindex.html">Modules</a>
      </div>
      <div class="nav">
    &laquo; <a href="1.7.4.html" title="Django 1.7.4 release notes">previous</a>
     |
    <a href="index.html" title="Release notes" accesskey="U">up</a>
   |
    <a href="1.7.2.html" title="Django 1.7.2 release notes">next</a> &raquo;</div>
    </div>

    <div id="bd">
      <div id="yui-main">
        <div class="yui-b">
          <div class="yui-g" id="releases-1.7.3">
            
  <div class="section" id="s-django-1-7-3-release-notes">
<span id="django-1-7-3-release-notes"></span><h1>Django 1.7.3 release notes<a class="headerlink" href="#django-1-7-3-release-notes" title="Permalink to this headline">¶</a></h1>
<p><em>January 13, 2015</em></p>
<p>Django 1.7.3 fixes several security issues and bugs in 1.7.2.</p>
<div class="section" id="s-wsgi-header-spoofing-via-underscore-dash-conflation">
<span id="wsgi-header-spoofing-via-underscore-dash-conflation"></span><h2>WSGI header spoofing via underscore/dash conflation<a class="headerlink" href="#wsgi-header-spoofing-via-underscore-dash-conflation" title="Permalink to this headline">¶</a></h2>
<p>When HTTP headers are placed into the WSGI environ, they are normalized by
converting to uppercase, converting all dashes to underscores, and prepending
<cite>HTTP_</cite>. For instance, a header <code class="docutils literal"><span class="pre">X-Auth-User</span></code> would become
<code class="docutils literal"><span class="pre">HTTP_X_AUTH_USER</span></code> in the WSGI environ (and thus also in Django&#8217;s
<code class="docutils literal"><span class="pre">request.META</span></code> dictionary).</p>
<p>Unfortunately, this means that the WSGI environ cannot distinguish between
headers containing dashes and headers containing underscores: <code class="docutils literal"><span class="pre">X-Auth-User</span></code>
and <code class="docutils literal"><span class="pre">X-Auth_User</span></code> both become <code class="docutils literal"><span class="pre">HTTP_X_AUTH_USER</span></code>. This means that if a
header is used in a security-sensitive way (for instance, passing
authentication information along from a front-end proxy), even if the proxy
carefully strips any incoming value for <code class="docutils literal"><span class="pre">X-Auth-User</span></code>, an attacker may be
able to provide an <code class="docutils literal"><span class="pre">X-Auth_User</span></code> header (with underscore) and bypass this
protection.</p>
<p>In order to prevent such attacks, both Nginx and Apache 2.4+ strip all headers
containing underscores from incoming requests by default. Django&#8217;s built-in
development server now does the same. Django&#8217;s development server is not
recommended for production use, but matching the behavior of common production
servers reduces the surface area for behavior changes during deployment.</p>
</div>
<div class="section" id="s-mitigated-possible-xss-attack-via-user-supplied-redirect-urls">
<span id="mitigated-possible-xss-attack-via-user-supplied-redirect-urls"></span><h2>Mitigated possible XSS attack via user-supplied redirect URLs<a class="headerlink" href="#mitigated-possible-xss-attack-via-user-supplied-redirect-urls" title="Permalink to this headline">¶</a></h2>
<p>Django relies on user input in some cases (e.g.
<a class="reference internal" href="../topics/auth/default.html#django.contrib.auth.views.login" title="django.contrib.auth.views.login"><code class="xref py py-func docutils literal"><span class="pre">django.contrib.auth.views.login()</span></code></a> and <a class="reference internal" href="../topics/i18n/index.html"><span class="doc">i18n</span></a>)
to redirect the user to an &#8220;on success&#8221; URL. The security checks for these
redirects (namely <code class="docutils literal"><span class="pre">django.utils.http.is_safe_url()</span></code>) didn&#8217;t strip leading
whitespace on the tested URL and as such considered URLs like
<code class="docutils literal"><span class="pre">\njavascript:...</span></code> safe. If a developer relied on <code class="docutils literal"><span class="pre">is_safe_url()</span></code> to
provide safe redirect targets and put such a URL into a link, they could suffer
from a XSS attack. This bug doesn&#8217;t affect Django currently, since we only put
this URL into the <code class="docutils literal"><span class="pre">Location</span></code> response header and browsers seem to ignore
JavaScript there.</p>
</div>
<div class="section" id="s-denial-of-service-attack-against-django-views-static-serve">
<span id="denial-of-service-attack-against-django-views-static-serve"></span><h2>Denial-of-service attack against <code class="docutils literal"><span class="pre">django.views.static.serve</span></code><a class="headerlink" href="#denial-of-service-attack-against-django-views-static-serve" title="Permalink to this headline">¶</a></h2>
<p>In older versions of Django, the <a class="reference internal" href="../ref/views.html#django.views.static.serve" title="django.views.static.serve"><code class="xref py py-func docutils literal"><span class="pre">django.views.static.serve()</span></code></a> view read
the files it served one line at a time. Therefore, a big file with no newlines
would result in memory usage equal to the size of that file. An attacker could
exploit this and launch a denial-of-service attack by simultaneously requesting
many large files. This view now reads the file in chunks to prevent large
memory usage.</p>
<p>Note, however, that this view has always carried a warning that it is not
hardened for production use and should be used only as a development aid. Now
may be a good time to audit your project and serve your files in production
using a real front-end web server if you are not doing so.</p>
</div>
<div class="section" id="s-database-denial-of-service-with-modelmultiplechoicefield">
<span id="database-denial-of-service-with-modelmultiplechoicefield"></span><h2>Database denial-of-service with <code class="docutils literal"><span class="pre">ModelMultipleChoiceField</span></code><a class="headerlink" href="#database-denial-of-service-with-modelmultiplechoicefield" title="Permalink to this headline">¶</a></h2>
<p>Given a form that uses <code class="docutils literal"><span class="pre">ModelMultipleChoiceField</span></code> and
<code class="docutils literal"><span class="pre">show_hidden_initial=True</span></code> (not a documented API), it was possible for a user
to cause an unreasonable number of SQL queries by submitting duplicate values
for the field&#8217;s data. The validation logic in <code class="docutils literal"><span class="pre">ModelMultipleChoiceField</span></code> now
deduplicates submitted values to address this issue.</p>
</div>
<div class="section" id="s-bugfixes">
<span id="bugfixes"></span><h2>Bugfixes<a class="headerlink" href="#bugfixes" title="Permalink to this headline">¶</a></h2>
<ul class="simple">
<li>The default iteration count for the PBKDF2 password hasher has been
increased by 25%. This part of the normal major release process was
inadvertently omitted in 1.7. This backwards compatible change will not
affect users who have subclassed
<code class="docutils literal"><span class="pre">django.contrib.auth.hashers.PBKDF2PasswordHasher</span></code> to change the
default value.</li>
<li>Fixed a crash in the CSRF middleware when handling non-ASCII referer header
(<a class="reference external" href="https://code.djangoproject.com/ticket/23815">#23815</a>).</li>
<li>Fixed a crash in the <code class="docutils literal"><span class="pre">django.contrib.auth.redirect_to_login</span></code> view when
passing a <a class="reference internal" href="../ref/urlresolvers.html#django.core.urlresolvers.reverse_lazy" title="django.core.urlresolvers.reverse_lazy"><code class="xref py py-func docutils literal"><span class="pre">reverse_lazy()</span></code></a> result on Python 3
(<a class="reference external" href="https://code.djangoproject.com/ticket/24097">#24097</a>).</li>
<li>Added correct formats for Greek (<code class="docutils literal"><span class="pre">el</span></code>) (<a class="reference external" href="https://code.djangoproject.com/ticket/23967">#23967</a>).</li>
<li>Fixed a migration crash when unapplying a migration where multiple operations
interact with the same model (<a class="reference external" href="https://code.djangoproject.com/ticket/24110">#24110</a>).</li>
</ul>
</div>
</div>


          </div>
        </div>
      </div>
      
        
          <div class="yui-b" id="sidebar">
            
      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
        <div class="sphinxsidebarwrapper">
  <h3><a href="../contents.html">Table Of Contents</a></h3>
  <ul>
<li><a class="reference internal" href="#">Django 1.7.3 release notes</a><ul>
<li><a class="reference internal" href="#wsgi-header-spoofing-via-underscore-dash-conflation">WSGI header spoofing via underscore/dash conflation</a></li>
<li><a class="reference internal" href="#mitigated-possible-xss-attack-via-user-supplied-redirect-urls">Mitigated possible XSS attack via user-supplied redirect URLs</a></li>
<li><a class="reference internal" href="#denial-of-service-attack-against-django-views-static-serve">Denial-of-service attack against <code class="docutils literal"><span class="pre">django.views.static.serve</span></code></a></li>
<li><a class="reference internal" href="#database-denial-of-service-with-modelmultiplechoicefield">Database denial-of-service with <code class="docutils literal"><span class="pre">ModelMultipleChoiceField</span></code></a></li>
<li><a class="reference internal" href="#bugfixes">Bugfixes</a></li>
</ul>
</li>
</ul>

  <h3>Browse</h3>
  <ul>
    
      <li>Prev: <a href="1.7.4.html">Django 1.7.4 release notes</a></li>
    
    
      <li>Next: <a href="1.7.2.html">Django 1.7.2 release notes</a></li>
    
  </ul>
  <h3>You are here:</h3>
  <ul>
      <li>
        <a href="../index.html">Django 1.8.19 documentation</a>
        
          <ul><li><a href="index.html">Release notes</a>
        
        <ul><li>Django 1.7.3 release notes</li></ul>
        </li></ul>
      </li>
  </ul>

  <div role="note" aria-label="source link">
    <h3>This Page</h3>
    <ul class="this-page-menu">
      <li><a href="../_sources/releases/1.7.3.txt"
            rel="nofollow">Show Source</a></li>
    </ul>
   </div>
<div id="searchbox" style="display: none" role="search">
  <h3>Quick search</h3>
    <form class="search" action="../search.html" method="get">
      <div><input type="text" name="q" /></div>
      <div><input type="submit" value="Go" /></div>
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
              <h3>Last update:</h3>
              <p class="topless">Mar 10, 2018</p>
          </div>
        
      
    </div>

    <div id="ft">
      <div class="nav">
    &laquo; <a href="1.7.4.html" title="Django 1.7.4 release notes">previous</a>
     |
    <a href="index.html" title="Release notes" accesskey="U">up</a>
   |
    <a href="1.7.2.html" title="Django 1.7.2 release notes">next</a> &raquo;</div>
    </div>
  </div>

      <div class="clearer"></div>
    </div>
  </body>
</html>