Commit Graph

14524 Commits

Author SHA1 Message Date
SnippyCodes
7bc9d39fbd [6.0.x] Fixed #36272 -- Removed obsolete libgeoip from GeoDjango installation docs.
Backport of 6c2436fa86 from main.
2026-02-06 10:32:16 -05:00
jafarkhan83
03a15d1063 [6.0.x] Fixed #36898 -- Documented SessionBase.is_empty().
Backport of 13299a6203 from main.
2026-02-03 11:03:26 -05:00
Jacob Walls
7b6b78f3de [6.0.x] Added CVE-2025-13473, CVE-2025-14550, CVE-2026-1207, CVE-2026-1285, CVE-2026-1287, and CVE-2026-1312 to security archive.
Backport of af361d3be4 from main.
2026-02-03 09:11:57 -05:00
Jacob Walls
0f6d33b825 [6.0.x] Added stub release notes for 6.0.3.
Backport of e7e43f1f91 from main.
2026-02-03 09:06:05 -05:00
Jacob Walls
15e70cb83e [6.0.x] Fixed CVE-2026-1312 -- Protected order_by() from SQL injection via aliases with periods.
Before, `order_by()` treated a period in a field name as a sign that it
was requested via `.extra(order_by=...)` and thus should be passed
through as raw table and column names, even if `extra()` was not used.
Since periods are permitted in aliases, this meant user-controlled
aliases could force the `order_by()` clause to resolve to a raw table
and column pair instead of the actual target field for the alias.

In practice, only `FilteredRelation` was affected, as the other
expressions we tested, e.g. `F`, aggressively optimize away the ordering
expressions into ordinal positions, e.g. ORDER BY 2, instead of ORDER BY
"table".column.

Thanks Solomon Kebede for the report, and Simon Charette and Jake Howard
for reviews.

Backport of 69065ca869 from main.
2026-02-03 08:04:49 -05:00
Jake Howard
0c0f5c2178 [6.0.x] Fixed CVE-2026-1287 -- Protected against SQL injection in column aliases via control characters.
Control characters in FilteredRelation column aliases could be used for
SQL injection attacks. This affected QuerySet.annotate(), aggregate(),
extra(), values(), values_list(), and alias() when using dictionary
expansion with **kwargs.

Thanks Solomon Kebede for the report, and Simon Charette, Jacob Walls,
and Natalia Bidart for reviews.

Backport of e891a84c7e from main.
2026-02-03 08:03:39 -05:00
Natalia
4b86ba51e4 [6.0.x] Fixed CVE-2026-1285 -- Mitigated potential DoS in django.utils.text.Truncator for HTML input.
The `TruncateHTMLParser` used `deque.remove()` to remove tags from the
stack when processing end tags. With crafted input containing many
unmatched end tags, this caused repeated full scans of the tag stack,
leading to quadratic time complexity.

The fix uses LIFO semantics, only removing a tag from the stack when it
matches the most recently opened tag. This avoids linear scans for
unmatched end tags and reduces complexity to linear time.

Refs #30686 and 6ee37ada32.

Thanks Seokchan Yoon for the report, and Jake Howard and Jacob Walls for
reviews.

Backport of a33540b3e2 from main.
2026-02-03 08:02:12 -05:00
Jacob Walls
8f77e73011 [6.0.x] Fixed CVE-2026-1207 -- Prevented SQL injections in RasterField lookups via band index.
Thanks Tarek Nakkouch for the report, and Simon Charette for the initial
triage and review.

Backport of 81aa529296 from main.
2026-02-03 08:01:15 -05:00
Jake Howard
972dbdd4f7 [6.0.x] Fixed CVE-2025-14550 -- Optimized repeated header parsing in ASGI requests.
Thanks Jiyong Yang for the report, and Natalia Bidart, Jacob Walls, and
Shai Berger for reviews.

Backport of eb22e1d6d6 from main.
2026-02-03 08:00:14 -05:00
Jake Howard
d72cc3be3b [6.0.x] Fixed CVE-2025-13473 -- Standardized timing of check_password() in mod_wsgi auth handler.
Refs CVE-2024-39329, #20760.

Thanks Stackered for the report, and Jacob Walls and Markus Holtermann
for the reviews.

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

Backport of 3eb814e02a from main.
2026-02-03 07:59:11 -05:00
Jacob Walls
f9bfb52798 [6.0.x] Fixed #36788 -- Fixed horizontal form field alignment under <fieldset> in the admin.
Thanks Antoliny for the review.

Regression in 4187da258f.

Backport of b665a67d61 from main.
2026-02-02 08:16:08 -05:00
Jacob Walls
da2125b562 [6.0.x] Added missing quotes around nonce in docs/ref/csp.txt.
Backport of 986f7f2098 from main.
2026-02-02 07:30:19 -05:00
Nilesh Kumar Pahari
77b306ea0f [6.0.x] Fixed #36847 -- Ensured auto_now_add fields are set on pre_save().
Regression in 94680437a4. Refs #27222.

During INSERT operations, `field.pre_save()` is called to prepare values
for db insertion. The `add` param must be `True` for `auto_now_add`
fields to be populated. The regression commit passed `False`, causing
`auto_now_add` fields to remain `None` when used by other fields, such
as `upload_to` callables.

Thanks Ran Benita for the report.

Backport of fe189dc43a from main.
2026-01-29 10:38:53 -03:00
Jacob Walls
b8fda9f580 [6.0.x] Added stub release notes and release date for 6.0.2, 5.2.11, and 4.2.28.
Backport of b30e09a942 from main.
2026-01-27 15:32:59 -05:00
Nilesh Kumar Pahari
c4429af53f [6.0.x] Fixed #36850 -- Prevented admin filter sidebar from wrapping below the changelist.
Removed flex-wrap from .changelist-form-container and added min-width to the
main content container to ensure proper layout behavior.
Regression in 6ea3319079.

Backport of e92d1e3b78 from main.
2026-01-26 10:26:25 -05:00
Clifford Gama
9814676ea7 [6.0.x] Refs #25508 -- Updated outdated QuerySet.__repr__() results.
Backport of d6cca8b904 from main.
2026-01-19 09:59:17 -05:00
Amar Ahmed Deina
3d9f04289b [6.0.x] Fixed #36856 -- Mentioned needsnewfeatureprocess resolution in contributor docs.
Co-authored-by: James Bligh <blighj@users.noreply.github.com>

Backport of 07a1640745 from main.
2026-01-15 07:27:34 -05:00
kundan223
8027c0a8d2 [6.0.x] Fixed #36855, Refs #27222 -- Mentioned multiple invocations of Field.pre_save() in 6.0 release notes.
Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com>

Backport of 924156072e from main.
2026-01-14 14:45:55 -05:00
Amar Ahmed Deina
8230e9b7fa [6.0.x] Fixed #36844 -- Clarified need for reusable apps to set default_auto_field in packaging tutorial and AppConfig docs.
Backport of 091ffc4e5e from main.
2026-01-08 10:21:08 -05:00
Tim Graham
770c4f9e20 [6.0.x] Clarified regression nature of data loss bug in docs/releases/6.0.1.txt and 5.2.10.txt.
Backport of 2be860d6cf from main.
2026-01-08 10:12:16 -05:00
Jacob Walls
3a975e20f0 [6.0.x] Added stub release notes for 6.0.2.
Backport of b59c215eab from main.
2026-01-06 14:05:48 -05:00
Jacob Walls
3ed443e338 [6.0.x] Added stub release notes for 5.2.11.
Backport of e937be3c1d from main.
2026-01-06 14:05:34 -05:00
Jacob Walls
ac4a5509e3 [6.0.x] Added release date for 6.0.1.
Backport of 496af73bf6 from main.
2026-01-06 13:05:07 -05:00
Jacob Walls
dcfc5b04ee [6.0.x] Added release date for 5.2.10.
Backport of f6fd35fc6d from main.
2026-01-06 13:04:02 -05:00
Jacob Walls
42bab76258 [6.0.x] Fixed #36843, #36793 -- Reverted "Fixed #27489 -- Renamed permissions upon model renaming in migrations."
This reverts commits f02b49d2f3 and 6e89271a85.

Backport of 030c63d329 from main.
2026-01-05 15:48:23 -05:00
Simon Charette
764af478be [6.0.x] Refs #33647 -- Fixed silent data truncation in bulk_create on Postgres.
Regression in a16eedcf9c.

The UNNEST strategy is affected by the same problem bulk_update has wrt/
to silent data truncation due to its usage of db_type which always returns
a parametrized subtype.

Backport of d6ae2ed868 from main.
2025-12-31 10:42:58 -05:00
Johannes Maron
b7b5465b1c [6.0.x] Fixed #36829 -- Reverted value of ClearableFileInput.use_fieldset to True.
There was unresolved discussion regarding whether to set
ClearableFileInput.use_fieldset to True or False when use_fieldset was
introduced in Django 4.1, since the clear checkbox appears only
sometimes. Although using <fieldset> is likely desirable, since the
primary motivation in #35892 was just to improve markup in the admin,
and a deprecation path was not provided for general form usage, future
work is deferred to #36828.

Regression in 4187da258f.

Thanks Tim Graham, Antoliny, and David Smith for triage.
2025-12-31 10:18:06 -05:00
Duane Hilton
90daa65548 [6.0.x] Fixed #30515 -- Documented resolve_url() in docs/topics/http/shortcuts.txt.
Backport of 626c15dba0 from main.
2025-12-26 12:30:34 -03:00
kundan223
d35daf8600 [6.0.x] Fixed #36796 -- Handled lazy routes correctly in RoutePattern.match().
Coerce lazy route values to `str` at match time to support prefix and
endpoint matching when using `gettext_lazy()` route paths.

Regression in f920937c8a.

Thanks to Andrea Angelini for the report, and to Jake Howard and Jacob
Walls for reviews.

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

Backport of 7bf3ac3ee2 from main.
2025-12-26 09:25:51 -03:00
Sean Reed
16107ab710 [6.0.x] Refs #36810 -- Avoided infinite recursion in LazyNonce.__repr__().
Moved nonce generation in ``django.utils.csp.LazyNonce`` to a function
to avoid infinite recursion in ``SimpleLazyObject.__repr__`` for
unevaluated instances.

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

Backport of 165c359996 from main.
2025-12-24 14:48:16 -03:00
ankan0503
774543ed4f [6.0.x] Fixed #36305 -- Added documentation indentation guidelines to contributing docs.
Backport of bddcefb00f from main.
2025-12-23 10:57:00 -03:00
Jacob Walls
7b12b917f2 [6.0.x] Fixed #36807 -- Fixed form field alignment under <fieldset> in the admin.
It isn't safe to set display: flex on <fieldset>, because on Safari this
interferes with display: block on child divs.

Thanks Paulo Coutinho for the report and Antoliny for the review.

Regression in 4187da258f.

Backport of 1eac2659a1 from main.
2025-12-22 21:04:35 -05:00
guro-Ishiguro
847b2badcc [6.0.x] Fixed #36818 -- Ensured SQLite connection before accessing max_query_params.
Regression in 358fd21c47.

Backport of 84bae9c22a from main.
2025-12-22 20:33:39 -05:00
Jacob Walls
f31445f2e7 [6.0.x] Refs #27100 -- Removed obsolete message from tutorial and migrations topic.
The project state is cached, so when it was calculated in #27100
during the pre-migrate stage, it was no longer calculated on forward
migrations. Backward migrations still calculate it.

Backport of 0def695e3c from main.
2025-12-22 20:25:31 -05:00
Skyiesac
b0befe1d40 [6.0.x] Fixed #36376 -- Fixed --no-color for command help in Python 3.14+.
https://github.com/python/cpython/pull/136809 made `color` default to
True in ArgumentParser.

Backport of d0d85cd165 from main.
2025-12-22 14:05:37 -05:00
Clifford Gama
ba7f49c321 [6.0.x] Fixed #36800 -- Restored ManyToManyField renaming in BaseDatabaseSchemaEditor.alter_field().
Regression in f9a44cc0fa.

Now that ManyToManyField is no longer concrete the decision of whether or not
it should be altered, which is also relied on by field renaming, should take
into consideration name changes even if it doesn't have a column associated
with it, as auto-created many-to-many relationship table names are a base of it.

Note that there is room for optimization here where a rename can be entirely
avoided if ManyToManyField.db_table remains stable between .name changes, just
like we do with Field.db_column remaining stable, but since this is a
regression and meant to be backported the current patch focuses on correctness
over further improvements.

Thanks Josik for the report.

Co-authored-by: Simon Charette <charette.s@gmail.com>

Backport of 6cc1231285 from main.
2025-12-16 17:47:10 -05:00
Marc Gibbons
be26ac85fd [6.0.x] Fixed #36783 -- Ensured proper handling of multi-value QueryDicts in querystring template tag.
Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com>
Co-authored-by: Natalia <124304+nessita@users.noreply.github.com>

Backport of 922c4cf972 from main.
2025-12-15 19:00:08 -03:00
David Sanders
6d4ccca48b [6.0.x] Refs #35444 -- Clarified StringAgg deprecation notice in docs/ref/contrib/postgres/aggregates.txt.
Backport of 8932a67725 from main.
2025-12-11 12:59:49 -05:00
Jake Howard
f8e55b39d4 [6.0.x] Included ASGI servers when noting what the server does.
Backport of 1651140a80 from main.
2025-12-11 12:42:37 -05:00
Carlton Gibson
0129f40bef [6.0.x] Noted testing uses for ContentTypeManager.clear_cache() method.
It is often necessary to reset the cache between tests, or after
preparing test state, when using content types. Django's test suite
already does this when needed, but users will need to do similar in
their own tests.

Backport of 37eb890969 from main.
2025-12-11 12:35:16 -05:00
Pravin Kamble
728e3067a6 [6.0.x] Fixed #36789 -- Added missing PDF file for docs/internals/_images/contribution_process.svg.
The PDF is needed to build the PDF version of the whole docs.

Backport of 2d5a780eb5 from main.
2025-12-11 13:39:42 -03:00
Jacob Walls
189dcb1002 [6.0.x] Fixed #36778 -- Extended advice to sanitize input before using in query expressions.
Thanks Clifford Gama and Simon Charette for reviews.

Backport of 334308efae from main.
2025-12-08 10:25:57 -05:00
Adam Johnson
9f61563b42 Refs #35581 -- Fixed email image inline attachment example.
1. Added imports and setup for clarity.
2. Removed adding `<` and `>` to Content-ID, as `make_msgid()` already
   includes them.
3. Removed `$` from reference in HTML, and instead stripped `<>` there, as
   required by HTML `cid:` references.
2025-12-08 09:44:51 -05:00
saurabh
2e7133c58b [6.0.x] Refs #36620 -- Added contributor documentation for code coverage reports.
This was included in the original reverted patch:
a89183e638
Follow-up to 26b0e2bb92.

Backport of e726254a38 from main.
2025-12-07 09:07:52 -05:00
Clifford Gama
bdd06c5457 [6.0.x] Refs #27834 -- Restored "expression" in StrIndex's docs signature.
Documentation regression in 20dbf19fc5.
Backport of 020e5799ad from main.
2025-12-05 10:29:49 -05:00
Dmitry Chestnykh
719db78a94 [6.0.x] Fixed #36744 -- Improved scrypt password hasher docs.
- Corrected work_factor description and its requirements.
- Added block_size description.
- Changed parallelism description to mention computations, rather than
  threads (currently it's not multithreaded.)
- For all of the above, added standard scrypt terminology (N, r, p).
- Mentioned that in multithreaded implementations, parallelism also
  influences the memory requirements.

Backport of 0ca3a06611 from main
2025-12-04 09:23:21 +01:00
Jake Howard
a0e8abe900 [6.0.x] Refs #36520 -- Removed release note for refactored parse_header_parameters.
Backport of ddb7236b0a from main.
2025-12-03 14:58:53 -05:00
Natalia
61e2ee4d71 [6.0.x] Added stub release notes for 6.0.1.
Backport of c02e65e34b from main.
2025-12-03 13:29:49 -03:00
Natalia
4f46d1f433 [6.0.x] Updated man page for Django 6.0. 2025-12-03 13:16:52 -03:00
Jacob Walls
a9f5ca5c58 [6.0.x] Refs #35859 -- Clarified Tasks ref and topics docs regarding available backends.
Backport of d3f142f2cd from main.
2025-12-03 13:09:57 -03:00