Debian Codegraph @

docs/releases/1.2.4.txt

raw
1 ==========================
2 Django 1.2.4 release notes
3 ==========================
4
5 Welcome to Django 1.2.4!
6
7 This is the fourth "bugfix" release in the Django 1.2 series,
8 improving the stability and performance of the Django 1.2 codebase.
9
10 With one exception, Django 1.2.4 maintains backwards compatibility
11 with Django 1.2.3. It also contains a number of fixes and other
12 improvements. Django 1.2.4 is a recommended upgrade for any
13 development or deployment currently using or targeting Django 1.2.
14
15 For full details on the new features, backwards incompatibilities, and
16 deprecated features in the 1.2 branch, see the :doc:`/releases/1.2`.
17
18 Backwards incompatible changes
19 ==============================
20
21 Restricted filters in admin interface
22 -------------------------------------
23
24 The Django administrative interface, ``django.contrib.admin``, supports
25 filtering of displayed lists of objects by fields on the corresponding
26 models, including across database-level relationships. This is
27 implemented by passing lookup arguments in the querystring portion of
28 the URL, and options on the ModelAdmin class allow developers to
29 specify particular fields or relationships which will generate
30 automatic links for filtering.
31
32 One historically-undocumented and -unofficially-supported feature has
33 been the ability for a user with sufficient knowledge of a model's
34 structure and the format of these lookup arguments to invent useful
35 new filters on the fly by manipulating the querystring.
36
37 However, it has been demonstrated that this can be abused to gain
38 access to information outside of an admin user's permissions; for
39 example, an attacker with access to the admin and sufficient knowledge
40 of model structure and relations could construct query strings which --
41 with repeated use of regular-expression lookups supported by the
42 Django database API -- expose sensitive information such as users'
43 password hashes.
44
45 To remedy this, ``django.contrib.admin`` will now validate that
46 querystring lookup arguments either specify only fields on the model
47 being viewed, or cross relations which have been explicitly
48 allowed by the application developer using the preexisting
49 mechanism mentioned above. This is backwards-incompatible for any
50 users relying on the prior ability to insert arbitrary lookups.
51
52 One new feature
53 ===============
54
55 Ordinarily, a point release would not include new features, but in the
56 case of Django 1.2.4, we have made an exception to this rule.
57
58 One of the bugs fixed in Django 1.2.4 involves a set of
59 circumstances whereby a running a test suite on a multiple database
60 configuration could cause the original source database (i.e., the
61 actual production database) to be dropped, causing catastrophic loss
62 of data. In order to provide a fix for this problem, it was necessary
63 to introduce a new setting -- :setting:`TEST_DEPENDENCIES` -- that
64 allows you to define any creation order dependencies in your database
65 configuration.
66
67 Most users -- even users with multiple-database configurations -- need
68 not be concerned about the data loss bug, or the manual configuration of
69 :setting:`TEST_DEPENDENCIES`. See the :ticket:`original problem report <14415>`
70 documentation on :ref:`controlling the creation order of test
71 databases <topics-testing-creation-dependencies>` for details.
72
73 GeoDjango
74 =========
75
76 The function-based :setting:`TEST_RUNNER` previously used to execute
77 the GeoDjango test suite, ``django.contrib.gis.tests.run_gis_tests``,
78 was finally deprecated in favor of a class-based test runner,
79 ``django.contrib.gis.tests.GeoDjangoTestSuiteRunner``, added in this
80 release.
81
82 In addition, the GeoDjango test suite is now included when
83 :ref:`running the Django test suite <running-unit-tests>` with ``runtests.py``
84 and using :ref:`spatial database backends <spatial-backends>`.