1
0
mirror of https://github.com/django/django.git synced 2025-06-12 15:09:12 +00:00

31793 Commits

Author SHA1 Message Date
Jake Howard
b597d46bb1 [4.2.x] Refs CVE-2025-48432 -- Prevented log injection in remaining response logging.
Migrated remaining response-related logging to use the `log_response()`
helper to avoid potential log injection, to ensure untrusted values like
request paths are safely escaped.

Co-authored-by: Natalia <124304+nessita@users.noreply.github.com>

Backport of 957951755259b412d5113333b32bf85871d29814 from main.
2025-06-06 09:24:47 -03:00
Natalia
10ba3f78da [4.2.x] Refs CVE-2025-48432 -- Made SuspiciousOperation logging use log_response() for consistency.
Backport of ff835f439cb1ecd8d74a24de12e3c03e5477dc9d from main.
2025-06-06 09:22:03 -03:00
Natalia
ba24ee34f9 [4.2.x] Refactored logging_tests to reuse assertions for log records.
Backport of 9d72e7daf7299ef1ece56fd657a02f77a469efe9 from main.
2025-06-06 09:21:16 -03:00
Natalia
b07f886af7 [4.2.x] Added CVE-2025-48432 to security archive.
Backport of 51923c576a596ad00214e44028f9dee9748bce95 from main.
2025-06-04 10:58:57 -03:00
Natalia
8d87045d8f [4.2.x] Post-release version bump. 2025-06-04 08:52:32 -03:00
Natalia
7275cc5d13 [4.2.x] Bumped version for 4.2.22 release. 4.2.22 2025-06-04 08:51:01 -03:00
Natalia
ac03c5e7df [4.2.x] Fixed CVE-2025-48432 -- Escaped formatting arguments in log_response().
Suitably crafted requests containing a CRLF sequence in the request
path may have allowed log injection, potentially corrupting log files,
obscuring other attacks, misleading log post-processing tools, or
forging log entries.

To mitigate this, all positional formatting arguments passed to the
logger are now escaped using "unicode_escape" encoding.

Thanks to Seokchan Yoon (https://ch4n3.kr/) for the report.

Co-authored-by: Carlton Gibson <carlton@noumenal.es>
Co-authored-by: Jake Howard <git@theorangeone.net>

Backport of a07ebec5591e233d8bbb38b7d63f35c5479eef0e from main.
2025-06-04 08:50:05 -03:00
Natalia
c62f4eeda7 [4.2.x] Added stub release notes and release date for 4.2.22.
Backport of 1a744343999c9646912cee76ba0a2fa6ef5e6240 from main.
2025-05-28 10:21:44 -03:00
Jason Judkins
c5b42632c9 [4.2.x] Fixed #36402, Refs #35980 -- Updated built package name in reusable apps tutorial for PEP 625.
Backport of 1307b8a1cb05762147736d0f347792b33f645390 from main.
2025-05-26 12:38:29 -03:00
Natalia
32fd8dec56 [4.2.x] Added helpers in csrf_tests and logging_tests to assert logs from log_response().
Backport of ad6f99889838ccc2c30b3c02ed3868c9b565e81b from main.
2025-05-22 15:45:13 -03:00
Natalia
acbe655a0f [4.2.x] Refs #26688 -- Added tests for log_response() internal helper.
Backport of 897046815944cc9a2da7ed9e8082f45ffe8110e3 from main.
2025-05-22 15:44:44 -03:00
Natalia
dc365cac9b [4.2.x] Refs #35980 -- Added release note about changes in release artifacts filenames.
Backport of 42ab99309d347f617d60751c2e8d627fb2963049 from main.
2025-05-09 13:33:55 -03:00
Natalia
c454afbf4c [4.2.x] Removed "Expected" from release date for 4.2.21.
Backport of c86156378db09e68db3a9ae1c108f661a67e3abe from main.
2025-05-09 13:33:08 -03:00
Natalia
5b29315848 [4.2.x] Cleaned up CVE-2025-32873 security archive description.
Backport of 37f2a77c729ccb71059c8e66c49b07499d2edf60 from main.
2025-05-07 11:38:00 -03:00
Natalia
0d5495850a [4.2.x] Added CVE-2025-32873 to security archive.
Backport of fdabda4e05587347aeb3382a442d7e77c1a0c3e5 from main.
2025-05-07 11:25:04 -03:00
Natalia
9db7076057 [4.2.x] Post-release version bump. 2025-05-06 22:39:26 -03:00
Natalia
87175d270a [4.2.x] Bumped version for 4.2.21 release. 4.2.21 2025-05-06 22:37:35 -03:00
Sarah Boyce
9cd8028f3e [4.2.x] Fixed CVE-2025-32873 -- Mitigated potential DoS in strip_tags().
Thanks to Elias Myllymäki for the report, and Shai Berger and Jake
Howard for the reviews.

Co-authored-by: Natalia <124304+nessita@users.noreply.github.com>

Backport of 9f3419b519799d69f2aba70b9d25abe2e70d03e0 from main.
2025-05-06 22:36:15 -03:00
Claude Paroz
ca31ca09f7 [4.2.x] Changed packing recommendation to use pyproject.toml in reusable apps docs.
Backport of f71bcc001bb3324020cfd756e84d4e9c6bb98cce from main.
2025-05-05 11:46:49 -03:00
Natalia
f4bd564701 [4.2.x] Adjusted GitHub Action workflow to test Python versions based off pyproject.toml. 2025-05-05 11:46:49 -03:00
Nick Pope
3456eee4a3 [4.2.x] Fixed #35980 -- Updated setuptools to normalize package names in built artifacts.
Backport of 3ae049b26b995c650c41ef918d5f60beed52b4ba from main.
2025-05-05 11:46:49 -03:00
Claude Paroz
afe52d89c4 [4.2.x] Migrated setuptools configuration to pyproject.toml.
This branch migrates setuptools configuration from setup.py/setup.cfg to
pyproject.toml. In order to ensure that the generated binary files have
consistent casing (both the tarball and the wheel), setuptools version
is limited to ">=61.0.0,<69.3.0".

Configuration for flake8 was moved to a dedicated .flake8 file since
it cannot be configured via pyproject.toml.

Also, __pycache__ exclusion was removed from MANIFEST and the
extras/Makefile was replaced with a simpler build command.

Co-authored-by: Nick Pope <nick@nickpope.me.uk>

Backport of 4686541691dbe986f58ac87630c3b7a04db4ff93 from main.
2025-05-05 11:46:49 -03:00
Claude Paroz
35c34ed2d0 [4.2.x] Removed obsolete rpm-related install code.
Backport of edcf8532ffda006bc125d9c93fca59f9037f490f from main.
2025-05-05 11:46:49 -03:00
Natalia
93973d4f88 [4.2.x] Added upcoming security release to release notes.
Backport of 0f5dd0dff3049189a3fe71a62670b746543335d5 from main.
2025-04-30 14:58:52 -03:00
nessita
b3df753399 [4.2.x] Refs #36341 -- Added release note for 4.2.21 for fix in wordwrap template filter.
Revision 1e9db35836d42a3c72f3d1015c2f302eb6fee046 fixed a regression in
55d89e25f4115c5674cdd9b9bcba2bb2bb6d820b, which also needs to be
backported to the stable branches in extended support.

Backport of c86242d61ff81bddbead115c458c1eb532d43b43 from main.
2025-04-23 17:35:28 -03:00
Matti Pohjanvirta
e61e3daaf0 [4.2.x] Fixed #36341 -- Preserved whitespaces in wordwrap template filter.
Regression in 55d89e25f4115c5674cdd9b9bcba2bb2bb6d820b.

This work improves the django.utils.text.wrap() function to ensure that
empty lines and lines with whitespace only are kept instead of being
dropped.

Thanks Matti Pohjanvirta for the report and fix.

Co-authored-by: Natalia <124304+nessita@users.noreply.github.com>

Backport of 1e9db35836d42a3c72f3d1015c2f302eb6fee046 from main.
2025-04-23 17:33:02 -03:00
David Smith
07edc976c7 [4.2.x] Upgraded to Python 3.12, Ubuntu 24.04, and enabled fail_on_warning for docs builds.
Backport of 73d532d9a92d4d472564f3251499a428d1da9835 from main.
2025-04-23 11:20:26 -03:00
Mariusz Felisiak
24eeba2c15 [4.2.x] Fixed warnings per flake8 7.2.0.
https://github.com/PyCQA/flake8/releases/tag/7.2.0

Backport of 281910ff8e9ae98fa78ee5d26ae3f0b713ccf418 from main.
2025-04-23 09:41:20 -03:00
nessita
d5db532077 [4.2.x] Pinned isort version to "<6.0.0" to avoid undesired reformat.
Backport of 0671a461c44ba4cf97e84b6c88413bed332df314 from main.
2025-04-23 08:55:43 -03:00
Sarah Boyce
318c16d2b8 [4.2.x] Fixed #36298 -- Truncated the overwritten file content in file_move_safe().
Regression in 58cd4902a71a3695dd6c21dc957f59c333db364c.

Thanks Baptiste Mispelon for the report.

Backport of 8ad3e80e88201f4c557f6fa79fcfc0f8a0961830 from main.
2025-04-07 16:17:50 +02:00
Sarah Boyce
506cf74b0a [4.2.x] Added CVE-2025-26699 to security archive.
Backport of bad1a18ff28a671f2fdfd447bdf8f43602f882c2 from main.
2025-03-06 14:09:31 +01:00
Sarah Boyce
6d3f4c13f1 [4.2.x] Post-release version bump. 2025-03-06 10:07:14 +01:00
Sarah Boyce
35c58a7924 [4.2.x] Bumped version for 4.2.20 release. 4.2.20 2025-03-06 10:03:51 +01:00
Sarah Boyce
e88f7376fe [4.2.x] Fixed CVE-2025-26699 -- Mitigated potential DoS in wordwrap template filter.
Thanks sw0rd1ight for the report.

Backport of 55d89e25f4115c5674cdd9b9bcba2bb2bb6d820b from main.
2025-03-06 10:01:44 +01:00
Sarah Boyce
348e46a3e0 [4.2.x] Added stub release notes and release date for 4.2.20.
Backport of ea1e3703bee28bfbe4f32ceb39ad31763353b143 from main.
2025-02-27 16:14:34 +01:00
Natalia
73e210755a [4.2.x] Post-release version bump. 2025-02-05 11:02:59 -03:00
Natalia
db89d2fee7 [4.2.x] Bumped version for 4.2.19 release. 4.2.19 2025-02-05 10:55:11 -03:00
Natalia
83231cca9c [4.2.x] Added release date for 4.2.19.
Backport of 294cc965efe0dfc8457aa5a8e78cb6d53abfcf92 from main.
2025-02-05 10:52:55 -03:00
Simon Charette
7bd1ddf1d8 [4.2.x] Refs #34060 -- Adjusted CVE-2024-53908 regression test for psycopg2.
The lack of explicit cast for JSON literals on psycopg2 is fixed on 5.1+ by
0d8fbe2ade29f1b7bd9e6ba7a0281f5478603a43 but didn't qualify for a backport to
stable/4.2.x.
2025-01-17 08:28:10 +01:00
Sarah Boyce
57b0229421
[4.2.x] Refs #36098 -- Fixed validate_ipv4_address() crash for non-string values.
Regression in ca2be7724e1244a4cb723de40a070f873c6e94bf.
2025-01-16 16:01:11 -03:00
Mariusz Felisiak
043dfadbce [4.2.x] Fixed #36098 -- Fixed validate_ipv6_address()/validate_ipv46_address() crash for non-string values.
Regression in ca2be7724e1244a4cb723de40a070f873c6e94bf.

Backport of b3c5830769d8a5dbf2f974da7116fe503c9454d9 from main.
2025-01-15 13:54:57 -03:00
Natalia
8769b44fda [4.2.x] Added CVE-2024-56374 to security archive.
Backport of f2a1dcaa53626ff11b921ef142b780a8fd746d32 from main.
2025-01-14 11:39:32 -03:00
Natalia
01db9774f6 [4.2.x] Post-release version bump. 2025-01-14 09:18:27 -03:00
Natalia
a7b0e50ead [4.2.x] Bumped version for 4.2.18 release. 4.2.18 2025-01-14 09:08:35 -03:00
Natalia
ad866a1ca3 [4.2.x] Fixed CVE-2024-56374 -- Mitigated potential DoS in IPv6 validation.
Thanks Saravana Kumar for the report, and Sarah Boyce and Mariusz
Felisiak for the reviews.

Co-authored-by: Natalia <124304+nessita@users.noreply.github.com>
2025-01-14 09:08:01 -03:00
Natalia
b0d309c9eb [4.2.x] Added stub release notes and release date for 4.2.18.
Backport of 53e21eebf22bc05c7fa30820b453b7f345b7af40 from main.
2025-01-07 12:37:42 -03:00
Sarah Boyce
39cf3c63f3 [4.2.x] Cleaned up CVE-2024-53907 and CVE-2024-53908 security archive descriptions.
Backport of eb665e076ca3417eb0ac654aed9e9c1853c5af84 from main.
2024-12-04 17:03:55 +01:00
Sarah Boyce
0ff19d12e7 [4.2.x] Added CVE-2024-53907 and CVE-2024-53908 to security archive.
Backport of 595cb4a7aeb1ba1770d10d601ce9a2b4e487c46e from main.
2024-12-04 16:33:06 +01:00
Sarah Boyce
6c4fc7d620 [4.2.x] Post-release version bump. 2024-12-04 14:37:13 +01:00
Sarah Boyce
1f0356ff2a [4.2.x] Bumped version for 4.2.17 release. 4.2.17 2024-12-04 14:34:11 +01:00