1.4.14.txt 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. ===========================
  2. Django 1.4.14 release notes
  3. ===========================
  4. *Under development*
  5. Django 1.4.14 fixes several security issues in 1.4.13.
  6. :func:`~django.core.urlresolvers.reverse()` could generate URLs pointing to other hosts
  7. =======================================================================================
  8. In certain situations, URL reversing could generate scheme-relative URLs (URLs
  9. starting with two slashes), which could unexpectedly redirect a user to a
  10. different host. An attacker could exploit this, for example, by redirecting
  11. users to a phishing site designed to ask for user's passwords.
  12. To remedy this, URL reversing now ensures that no URL starts with two slashes
  13. (//), replacing the second slash with its URL encoded counterpart (%2F). This
  14. approach ensures that semantics stay the same, while making the URL relative to
  15. the domain and not to the scheme.
  16. File upload denial-of-service
  17. =============================
  18. Before this release, Django's file upload handing in its default configuration
  19. may degrade to producing a huge number of ``os.stat()`` system calls when a
  20. duplicate filename is uploaded. Since ``stat()`` may invoke IO, this may produce
  21. a huge data-dependent slowdown that slowly worsens over time. The net result is
  22. that given enough time, a user with the ability to upload files can cause poor
  23. performance in the upload handler, eventually causing it to become very slow
  24. simply by uploading 0-byte files. At this point, even a slow network connection
  25. and few HTTP requests would be all that is necessary to make a site unavailable.
  26. We've remedied the issue by changing the algorithm for generating file names
  27. if a file with the uploaded name already exists.
  28. :meth:`Storage.get_available_name()
  29. <django.core.files.storage.Storage.get_available_name>` now appends an
  30. underscore plus a random 7 character alphanumeric string (e.g. ``"_x3a1gho"``),
  31. rather than iterating through an underscore followed by a number (e.g. ``"_1"``,
  32. ``"_2"``, etc.).