1.6.6.txt 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. ==========================
  2. Django 1.6.6 release notes
  3. ==========================
  4. *Under development*
  5. Django 1.6.6 fixes several security issues and bugs in 1.6.5.
  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.).
  33. Bugfixes
  34. ========
  35. * Corrected email and URL validation to reject a trailing dash
  36. (:ticket:`22579`).
  37. * Prevented indexes on PostgreSQL virtual fields (:ticket:`22514`).
  38. * Prevented edge case where values of FK fields could be initialized with a
  39. wrong value when an inline model formset is created for a relationship
  40. defined to point to a field other than the PK (:ticket:`13794`).
  41. * Restored ``pre_delete`` signals for ``GenericRelation`` cascade deletion
  42. (:ticket:`22998`).
  43. * Fixed transaction handling when specifying non-default database in
  44. ``createcachetable`` and ``flush`` (:ticket:`23089`).
  45. * Fixed the "ORA-01843: not a valid month" errors when using Unicode
  46. with older versions of Oracle server (:ticket:`20292`).
  47. * Restored bug fix for sending unicode email with Python 2.6.5 and below
  48. (:ticket:`19107`).
  49. * Prevented ``UnicodeDecodeError`` in ``runserver`` with non-UTF-8 and
  50. non-English locale (:ticket:`23265`).
  51. * Fixed JavaScript errors while editing multi-geometry objects in the OpenLayers
  52. widget (:ticket:`23137`, :ticket:`23293`).
  53. * Prevented a crash on Python 3 with query strings containing unencoded
  54. non-ASCII characters (:ticket:`22996`).