1
0
mirror of https://github.com/django/django.git synced 2025-04-15 12:54:38 +00:00

12293 Commits

Author SHA1 Message Date
Mariusz Felisiak
1037825eed [3.2.x] Added stub release notes for Django 3.2.4.
Backport of 820408d842a07202a80e6ef7f7a57ec6258d88e6 from main
2021-05-13 09:45:39 +02:00
Mariusz Felisiak
224b8e5a5a [3.2.x] Fixed #32718 -- Relaxed file name validation in FileField.
- Validate filename returned by FileField.upload_to() not a filename
  passed to the FileField.generate_filename() (upload_to() may
  completely ignored passed filename).
- Allow relative paths (without dot segments) in the generated filename.

Thanks to Jakub Kleň for the report and review.
Thanks to all folks for checking this patch on existing projects.
Thanks Florian Apolloner and Markus Holtermann for the discussion and
implementation idea.

Regression in 0b79eb36915d178aef5c6a7bbce71b1e76d376d3.
Backport of b55699968fc9ee985384c64e37f6cc74a0a23683 from main
2021-05-13 08:55:00 +02:00
Simon Charette
386caa5445 [3.2.x] Fixed #32717 -- Fixed filtering of querysets combined with the | operator.
Address a long standing bug in a Where.add optimization to discard
equal nodes that was surfaced by implementing equality for Lookup
instances in bbf141bcdc31f1324048af9233583a523ac54c94.

Thanks Shaheed Haque for the report.

Backport of b81c7562fc33f50166d5120138d6398dc42b13c3 from main
2021-05-13 07:53:56 +02:00
David Smith
d6b6eda4ed [3.2.x] Fixed #26721 -- Doc'd setting UTF-8 on Windows.
Backport of 0456d3e42795481a186db05719300691fe2a1029 from main
2021-05-12 20:46:31 +02:00
Nick Pope
4318e60a80 [3.2.x] Fixed #32732 -- Removed usage of deprecated 'db' and 'passwd' connection options in MySQL backend.
The 'db' and 'passwd' connection options have been deprecated, use
'database' and 'password' instead (available since mysqlclient >= 1.3.8).

This also allows the 'database' option in DATABASES['OPTIONS'] on MySQL.

Backport of 1061f5243646b4c9b8a758f8a36c9e2ccdded1cf from main
2021-05-12 13:35:13 +02:00
Nick Pope
cd84f7acfa [3.2.x] Refs #32366 -- Avoided use of datetime.utcnow() in the documentation.
Backport of 69ffb1acf38bd34f76707468bb592eb4b164e2da from main
2021-05-12 12:12:28 +02:00
Nick Pope
fab710d3ff [3.2.x] Fixed a typo in docs/ref/models/fields.txt.
datetime.date.utcnow() doesn't exist, should be .today().

Backport of 88b3982af396a7c2eca0db9c52dfa9830045cc19 from main
2021-05-12 12:12:10 +02:00
Mariusz Felisiak
dc7b495dae [3.2.x] Refs #32718 -- Corrected CVE-2021-31542 release notes.
Backport of d1f1417caed648db2f81a1ec28c47bf958c01958 from main
2021-05-12 10:42:32 +02:00
Nick Pope
bdd565422d [3.2.x] Fixed typo in docs/internals/contributing/writing-documentation.txt.
Backport of c240ceea7d88c6a8058dcacb37356c93e0a3618f from main
2021-05-06 20:02:11 +02:00
Mariusz Felisiak
8afb677ce7 [3.2.x] Added stub release notes for Django 3.2.3.
Backport of 29779075d7f5e1a8cfe0933661d5255e2d7d3cbd from main
2021-05-06 10:11:32 +02:00
Mariusz Felisiak
0262579f2e [3.2.x] Added CVE-2021-32052 to security archive.
Backport of efebcc429f048493d6bc710399e65d98081eafd5 from main
2021-05-06 10:03:45 +02:00
Mariusz Felisiak
2d2c1d0c97 [3.2.x] Fixed #32713, Fixed CVE-2021-32052 -- Prevented newlines and tabs from being accepted in URLValidator on Python 3.9.5+.
In Python 3.9.5+ urllib.parse() automatically removes ASCII newlines
and tabs from URLs [1, 2]. Unfortunately it created an issue in
the URLValidator. URLValidator uses urllib.urlsplit() and
urllib.urlunsplit() for creating a URL variant with Punycode which no
longer contains newlines and tabs in Python 3.9.5+. As a consequence,
the regular expression matched the URL (without unsafe characters) and
the source value (with unsafe characters) was considered valid.

[1] https://bugs.python.org/issue43882 and
[2] 76cd81d603

Backport of e1e81aa1c4427411e3c68facdd761229ffea6f6f from main.
2021-05-06 08:48:22 +02:00
Simon Charette
364098fdac [3.2.x] Fixed #32714 -- Prevented recreation of migration for Meta.ordering with OrderBy expressions.
Regression in c8b659430556dca0b2fe27cf2ea0f8290dbafecd.

Thanks Kevin Marsh for the report.

Backport of 96f55ccf798c7592a1203f798a4dffaf173a9263 from main
2021-05-05 08:44:37 +02:00
Carlton Gibson
df801dde33 [3.2.x] Added CVE-2021-31542 to security archive.
Backport of 607ebbfba915de2d84eb943aa93654f31817a709 and
62b2e8b37e37a313c63be40e3223ca4e830ebde3 from main
2021-05-04 11:10:50 +02:00
Carlton Gibson
04d8ed3660 [3.2.x] Added stub release notes for Django 3.2.2.
Backport of 5a43cfe24533591a020ba4e730440bad81c478db from main
2021-05-04 11:02:11 +02:00
Florian Apolloner
c98f446c18 [3.2.x] Fixed CVE-2021-31542 -- Tightened path & file name sanitation in file uploads. 2021-05-04 08:43:52 +02:00
Susan Wright
8e1900d4f3 [3.2.x] Added spelling option to make.bat.
Backport of 7582d913e7db7f32e4cdcfafc177aa77cbbf4332 from main
2021-04-30 14:09:59 +02:00
Hasan Ramezani
ce130749d5 [3.2.x] Refs #32178 -- Doc'd DatabaseFeatures.django_test_skips/django_test_expected_failures in contributing guide.
Backport of ca34db46504fca1221e27f6ab13734dfdfde6e1c from main
2021-04-29 20:56:08 +02:00
Carlton Gibson
bac416972d [3.2.x] Refs #32674 -- Noted that auto-created through table PKs cannot be automatically migrated.
Backport of 907d3a7ff4e12ad4ccc86af26a728007fe4d6fa2 from main
2021-04-29 15:14:15 +02:00
Carlton Gibson
d716d30a19 [3.2.x] Refs #32694 -- Clarified when colorama requirement is needed in Windows how-to.
Backport of 4f128fcf5dd5099a5ea374a87cad64852a9b62dd from main
2021-04-29 11:27:39 +02:00
Adam Johnson
263ee4434f [3.2.x] Corrected introduction to range field lookups docs.
Follow up to 24b9f5082344a127147266dd52d5d2dcd1c9cb44.
Backport of 68e876c0953f882e54dddd49ef727f9e38e2d0d1 from main
2021-04-28 20:35:28 +02:00
Simon Charette
d5add5d3a2 [3.2.x] Fixed #32632, Fixed #32657 -- Removed flawed support for Subquery deconstruction.
Subquery deconstruction support required implementing complex and
expensive equality rules for sql.Query objects for little benefit as
the latter cannot themselves be made deconstructible to their reference
to model classes.

Making Expression @deconstructible and not BaseExpression allows
interested parties to conform to the "expression" API even if they are
not deconstructible as it's only a requirement for expressions allowed
in Model fields and meta options (e.g. constraints, indexes).

Thanks Phillip Cutter for the report.

This also fixes a performance regression in bbf141bcdc31f1324048af9233583a523ac54c94.

Backport of c8b659430556dca0b2fe27cf2ea0f8290dbafecd from main
2021-04-28 20:27:42 +02:00
Konstantin Alekseev
55cb3c8ac1 [3.2.x] Fixed #32687 -- Restored passing process’ environment to underlying tool in dbshell on PostgreSQL.
Regression in bbe6fbb8768e8fb1aecb96d51c049d7ceaf802d3.

Backport of 6e742dabc95b00ba896434293556adeb4dbaee8a from main.
2021-04-27 12:02:06 +02:00
Mariusz Felisiak
34981f399a [3.2.x] Fixed #32682 -- Made admin changelist use Exists() instead of distinct() for preventing duplicates.
Thanks Zain Patel for the report and Simon Charette for reviews.

The exception introduced in 6307c3f1a123f5975c73b231e8ac4f115fd72c0d
revealed a possible data loss issue in the admin.

Backport of 187118203197801c6cb72dc8b06b714b23b6dd3d from main
2021-04-27 10:39:55 +02:00
Mariusz Felisiak
fbea64b8ce [3.2.x] Refs #32682 -- Renamed use_distinct variable to may_have_duplicates.
QuerySet.distinct() is not the only way to avoid duplicate, it's also
not preferred.

Backport of cd74aad90e09865ae6cd8ca0377ef0a5008d14e9 from main
2021-04-27 10:37:13 +02:00
Zain Patel
0dfe88eaba [3.2.x] Fixed #32681 -- Fixed VariableDoesNotExist when rendering some admin template.
Regression in 84609b3205905097d7d3038d32e6101f012c0619.

Backport of 4e5bbb6ef2287126badd32842b239f4a8a7394ca from main.
2021-04-26 12:52:33 +02:00
Clumart.G
fc9cbad880 [3.2.x] Refs #28034 -- Corrected docs example in contributing tutorial.
Backport of 67bb1f516cf507feb141fd4ef746456e1ef67c4a from main
2021-04-23 15:25:12 +02:00
Carlton Gibson
4c63459692 [3.2.x] Added note to update docs config when creating new stable branch.
django_next_version in docs/conf.py should be bumped when creating a new stable
branch.

Backport of 6a7af38b072f97d15e06aba87c673c16ecafe5a8 from main
2021-04-22 09:02:59 +02:00
Abhyudai
7d7c6d9a3a [3.2.x] Fixed #32667 -- Added link to labeling checks in BaseCommand.requires_system_checks docs.
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
Backport of 4a77aeb1f86bc06e18023cac10109e067ed20800 from main
2021-04-21 16:40:33 +02:00
Simon Charette
48e19bae49 [3.2.x] Fixed #32650 -- Fixed handling subquery aliasing on queryset combination.
This issue started manifesting itself when nesting a combined subquery
relying on exclude() since 8593e162c9cb63a6c0b06daf045bc1c21eb4d7c1 but
sql.Query.combine never properly handled subqueries outer refs in the
first place, see QuerySetBitwiseOperationTests.test_subquery_aliases()
(refs #27149).

Thanks Raffaele Salmaso for the report.

Backport of 6d0cbe42c3d382e5393d4af48185c546bb0ada1f from main
2021-04-21 10:32:39 +02:00
Mariusz Felisiak
1cc2eaf02d [3.2.x] Fixed #32665 -- Fixed caches system check crash when STATICFILES_DIRS is a list of 2-tuples.
Thanks Jared Lockhart for the report.

Regression in c36075ac1dddfa986340b1a5e15fe48833322372.
Backport of 34d1905712d33e72c76b3a55a4fc24abbd11be6c from main
2021-04-21 09:42:43 +02:00
Carlton Gibson
54d5bfa9c5 [3.2.x] Fixed #32647 -- Restored multi-row select with shift-modifier in admin changelist.
Regression in 30e59705fc3e3e9e8370b965af794ad6173bf92b.

Backport of 5c73fbb6a93ee214678f02ba4027f18dff49337b from main
2021-04-21 09:08:34 +02:00
Adam Johnson
4acce4d95f [3.2.x] Corrected File, ContentFile, and ImageFile signatures in docs.
Backport of 725ca1fb60da2ef1bb6db146cd2d735591e75fbd from main
2021-04-16 10:32:54 +02:00
Carlton Gibson
99ea737a0f [3.2.x] Fixed #32652 -- Fixed links to new contributors FAQ.
Backport of e3e2276e6fe6fd77e4fbdeeb2a287288d31de3bb from main
2021-04-15 17:16:22 +02:00
Florian Apolloner
539d005aa5 [3.2.x] Fixed #32643 -- Fixed decoding of messages in the pre-Django 3.2 format.
Thanks Jan Pieter Waagmeester for the report.

Regression in 2d6179c819010f6a9d00835d5893c4593c0b85a0.

Backport of 4511d1459810037b91faa5b506e4f75c77aa72be from main.
2021-04-15 07:58:48 +02:00
Mariusz Felisiak
208e72276a [3.2.x] Fixed #32645 -- Fixed QuerySet.update() crash when ordered by joined fields on MySQL/MariaDB.
Thanks Matt Westcott for the report.

Regression in 779e615e362108862f1681f965ee9e4f1d0ae6d2.
Backport of ca9872905559026af82000e46cde6f7dedc897b6 from main
2021-04-14 21:13:27 +02:00
Jonathan Richards
d0267690f8 [3.2.x] Fixed #32548 -- Fixed crash when combining Q() objects with boolean expressions.
Backport of 00b0786de533dbb3f6208d8d5eaddbf765b4e5b8 from main.

Regression in 466920f6d726eee90d5566e0a9948e92b33a122e.
2021-04-14 19:46:45 +02:00
Arthur Jovart
65dfb06a1a [3.2.x] Fixed #32648 -- Fixed VariableDoesNotExist rendering sitemaps template.
Backport of 08c60cce3b13f6e60d7588206da2d3c71228f378 from main
2021-04-14 19:44:10 +02:00
Mariusz Felisiak
59cce8237c [3.2.x] Fixed #32649 -- Fixed ModelAdmin.search_fields crash when searching against phrases with unbalanced quotes.
Thanks Dlis for the report.

Regression in 26a413507abb38f7eee4cf62f2ee9727fdc7bf8d.
Backport of 23fa29f6a6659e0f600d216de6bcb79e7f6818c9 from main
2021-04-14 12:24:11 +02:00
Hasan Ramezani
700356f93b [3.2.x] Fixed #32635 -- Fixed system check crash for reverse o2o relations in CheckConstraint.check and UniqueConstraint.condition.
Regression in b7b7df5fbcf44e6598396905136cab5a19e9faff.

Thanks Szymon Zmilczak for the report.

Backport of a77c9a4229cfef790ec18001b2cd18bd9c4aedbc from main
2021-04-14 10:32:07 +02:00
Mariusz Felisiak
d6314c4c2e [3.2.x] Fixed #32637 -- Restored exception message on technical 404 debug page.
Thanks Atul Varma for the report.
Backport of 3b8527e32b665df91622649550813bb1ec9a9251 from main
2021-04-13 09:15:25 +02:00
Iuri de Silvio
b245845575 [3.2.x] Fixed #32627 -- Fixed QuerySet.values()/values_list() crash on combined querysets ordered by unannotated columns.
Backport of 9760e262f85ae57df39abe2799eff48a82b14474 from main
2021-04-13 06:16:19 +02:00
Carlton Gibson
98db3c76fc [3.2.x] Bumped django_next_version in docs config. 2021-04-10 19:06:18 +02:00
Hasan Ramezani
078bcd587d [3.2.x] Fixed #32618 -- Added link to conditional aggregation in aggregation topic guide.
Backport of 1351f2ee163145df2cf5471eb3e57289f8853512 from main
2021-04-09 21:35:43 +02:00
Hasan Ramezani
0abbdc8ef6 [3.2.x] Fixed #32535 -- Added note about DEBUG_PROPAGATE_EXCEPTIONS setting to middleware docs.
Backport of fc268c8648d0d0375d01d36aa1f05f1172ff1566 from main
2021-04-09 10:48:10 +02:00
Adam Johnson
49e618f4af [3.2.x] Fixed #32620 -- Allowed subclasses of Big/SmallAutoField for DEFAULT_AUTO_FIELD.
Backport of 45a58c31e64dbfdecab1178b1d00a3803a90ea2d from main
2021-04-08 13:44:21 +02:00
Carlton Gibson
55da04488e [3.2.x] Corrected release number format in 3.2.1 release notes.
Backport of 3f2920ae1d91e67ebf677d407da528c04188384e from main
2021-04-07 19:45:29 +02:00
Claude Paroz
5eb17d31c3 [3.2.x] Fixed #32544 -- Confirmed support for GDAL 3.2 and GEOS 3.9.
Backport of e3cfba0029516aafe40f963378e234df2c0d33bb from main.
2021-04-07 17:04:10 +02:00
Carlton Gibson
a3a4a0baa3 [3.2.x] Corrected wrapping in 3.2 release notes.
Partially reverts 0802b404a210862e6765a6c7dee6cba61085d7a6.
Backport of 5b05a45c62f4702a6039cd3de290320c232cb808 from main
2021-04-07 07:28:09 +02:00
Mariusz Felisiak
42fea5d5b8 [3.2.x] Refs #30156 -- Corrected version in SpatiaLite install instructions.
Backport of da542ccab6d61e1467199b52f77f64a2d72f5faf from main
2021-04-06 12:45:15 +02:00