| Age | Commit message (Collapse) | Author |
|
|
|
aliases contain periods.
This prevents failures at the database layer, given that aliases in the
ON clause are not quoted.
Systematically quoting aliases even in FilteredRelation is tracked in
https://code.djangoproject.com/ticket/36795.
Backport of 005d60d97c4dfb117503bdb6f2facfcaf9315d84 from main.
|
|
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 69065ca869b0970dff8fdd8fafb390bf8b3bf222 from main.
|
|
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 e891a84c7ef9962bfcc3b4685690219542f86a22 from main.
|
|
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 6ee37ada3241ed263d8d1c2901b030d964cbd161.
Thanks Seokchan Yoon for the report, and Jake Howard and Jacob Walls for
reviews.
Backport of a33540b3e20b5d759aa8b2e4b9ca0e8edd285344 from main.
|
|
lookups via band index.
Thanks Tarek Nakkouch for the report, and Simon Charette for the initial
triage and review.
Backport of 81aa5292967cd09319c45fe2c1a525ce7b6684d8 from main.
|
|
requests.
Thanks Jiyong Yang for the report, and Natalia Bidart, Jacob Walls, and
Shai Berger for reviews.
Backport of eb22e1d6d643360e952609ef562c139a100ea4eb from main.
|
|
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 3eb814e02a4c336866d4189fa0c24fd1875863ed from main.
|
|
Backport of d725f6856d7488ba2a397dfe47dd851420188159 from main.
|
|
<fieldset> in the admin.
Thanks Antoliny for the review.
Regression in 4187da258fe212d494cb578a0bc2b52c4979ab95.
Backport of b665a67d61a8a4fd2ad85aeb77282bc49541723f from main.
|
|
Backport of 986f7f2098a2186b4085183951cbebae15220556 from main.
|
|
Regression in 94680437a45a71c70ca8bd2e68b72aa1e2eff337. 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 fe189dc43ab3eddbbceefb6834893b73ca60d5ed from main.
|
|
Backport of b30e09a94270fdaa4bf282bf442b758c9a6d0bb0 from main.
|
|
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 6ea331907996a51842da55c1f8d65eea7b367c7d.
Backport of e92d1e3b7858981185e93d717c5727544d66b66e from main.
|
|
Backport of d6cca8b904de144946453aea93dd627c09abfca9 from main.
|
|
contributor docs.
Co-authored-by: James Bligh <blighj@users.noreply.github.com>
Backport of 07a16407452f5b62594661ae7ae589eca8cccd4d from main.
|
|
Field.pre_save() in 6.0 release notes.
Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com>
Backport of 924156072ecf61ef9cf50fa0d4d553a4c0d416c2 from main.
|
|
default_auto_field in packaging tutorial and AppConfig docs.
Backport of 091ffc4e5eb35776864b853973097588a36f169e from main.
|
|
docs/releases/6.0.1.txt and 5.2.10.txt.
Backport of 2be860d6cfb04c9b3643f7c31ce90df280c8e747 from main.
|
|
Co-authored-by: Jake Howard <git@theorangeone.net>
Backport of c08ed084f9651ab628dad83dd4459d9bba553e22 from main.
|
|
Backport of b59c215eab1d6ac98072731ea1fd58e0ebfd6909 from main.
|
|
Backport of e937be3c1dc02cd06c14875be23d452b426d0d25 from main.
|
|
|
|
|
|
Backport of 496af73bf620ac5478082c06871bb665c620d414 from main.
|
|
Backport of f6fd35fc6ddadc93720656b9882e28712f2492fc from main.
|
|
permissions upon model renaming in migrations."
This reverts commits f02b49d2f3bf84f5225de920ca510149f1f9f1da and 6e89271a8507fe272d11814975500a1b40303a04.
Backport of 030c63d329c4814da221528e823a4aaaaa40e4f1 from main.
|
|
Regression in a16eedcf9c69d8a11d94cac1811018c5b996d491.
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 d6ae2ed868e43671afc4d433c3d8f4d27f7eb555 from main.
|
|
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 4187da258fe212d494cb578a0bc2b52c4979ab95.
Thanks Tim Graham, Antoliny, and David Smith for triage.
|
|
docs/topics/http/shortcuts.txt.
Backport of 626c15dba0662d5b9f61cc7eddf985e514293d6f from main.
|
|
Coerce lazy route values to `str` at match time to support prefix and
endpoint matching when using `gettext_lazy()` route paths.
Regression in f920937c8a63df6bea220e4386f59cdb45b2e355.
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 7bf3ac3ee255bcfe329e3203c7a2555b1275d506 from main.
|
|
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 165c3599965e63f88649a46fcc2ff681c52f2f66 from main.
|
|
contributing docs.
Backport of bddcefb00f555196d3c488fbad71d303e9f7ede1 from main.
|
|
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 4187da258fe212d494cb578a0bc2b52c4979ab95.
Backport of 1eac2659a102d42490f9401b08782633fa51f3e3 from main.
|
|
max_query_params.
Regression in 358fd21c47cdf7bda520ce73c5cfd82bba57827b.
Backport of 84bae9c22a8ae7663c56cce5e0c611ea7c17fce1 from main.
|
|
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 0def695e3cbaa9ede9ae4040a24cfed7417f9065 from main.
|
|
https://github.com/python/cpython/pull/136809 made `color` default to
True in ArgumentParser.
Backport of d0d85cd165e54582cce98cf685252e771460a9d4 from main.
|
|
BaseDatabaseSchemaEditor.alter_field().
Regression in f9a44cc0fac653f8e0c2ab1cdfb12b2cc5c63fc2.
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 6cc1231285a20b11058143f8cb0a6b4b3999b23a from main.
|
|
querystring template tag.
Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com>
Co-authored-by: Natalia <124304+nessita@users.noreply.github.com>
Backport of 922c4cf972e04b1ce7ecee592231106724dcfd09 from main.
|
|
docs/ref/contrib/postgres/aggregates.txt.
Backport of 8932a677258fbda34f24a1be6f426265148b0003 from main.
|
|
Backport of 1651140a80e1b5e19784a6a859b6dd2e44c5d7f7 from main.
|
|
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 37eb8909699d261b9b879e6f04dbfeec75b5e080 from main.
|
|
forkserver mode.
This variable should only be set once. Under forkserver, this module
was getting executed multiple times, causing nested temporary dirs
that didn't clean up properly, raising FileNotFoundError.
This similar to #27890 although a slightly different cause.
Backport of cd6278c4c09e4af9b2988d585b372d9abeeb63ee from main.
|
|
docs/internals/_images/contribution_process.svg.
The PDF is needed to build the PDF version of the whole docs.
Backport of 2d5a780eb5c83775f428e152517abc05b759cb8a from main.
|
|
change for incomplete entities.
Backport of 7b80b2186300620931009fd62c2969f108fe7a62 from main.
|
|
query expressions.
Thanks Clifford Gama and Simon Charette for reviews.
Backport of 334308efae8e0c7b1523d5583af32b674a098eba from main.
|
|
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.
|
|
reports.
This was included in the original reverted patch:
a89183e63844a937aacd3ddb73c4952ef869d2cc
Follow-up to 26b0e2bb92caf2d16cabe455792350f20d6f42ca.
Backport of e726254a380f2a35a2fcf71143e96cb5987d8102 from main.
|
|
Documentation regression in 20dbf19fc505f0383e96b323905953c863817fe4.
Backport of 020e5799ad74cfafd469f032cd05767c9d670a16 from main.
|
|
- 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 0ca3a0661173b02e2cbb0183d8543e790e7e4a55 from main
|