1
0
mirror of https://github.com/django/django.git synced 2025-01-15 04:45:51 +00:00

12 Commits

Author SHA1 Message Date
Adam Johnson
16a8fe18a3 [5.0.x] Fixed CVE-2024-24680 -- Mitigated potential DoS in intcomma template filter.
Thanks Seokchan Yoon for the report.

Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
Co-authored-by: Natalia <124304+nessita@users.noreply.github.com>
Co-authored-by: Shai Berger <shai@platonix.com>
2024-02-06 09:13:21 -03:00
Simon Charette
761946f8e1 [5.0.x] Fixed #35149 -- Fixed crashes of db_default with unresolvable output field.
Field.db_default accepts either literal Python values or compilables
(as_sql) and wrap the former ones in Value internally.

While 1e38f11 added support for automatic resolving of output fields for
types such as str, int, float, and other unambigous ones it's cannot do
so for all types such as dict or even contrib.postgres and contrib.gis
primitives.

When a literal, non-compilable, value is provided it likely make the
most sense to bind its output field to the field its attached to avoid
forcing the user to provide an explicit `Value(output_field)`.

Thanks David Sanders for the report.

Backport of e67d7d70fa10c06aca36b9057f82054eda45269d from main
2024-02-04 14:48:44 +01:00
Simon Charette
3e7a30fb3a [5.0.x] Fixed #35162 -- Fixed crash when adding fields with db_default on MySQL.
MySQL doesn't allow literal DEFAULT values to be used for BLOB, TEXT,
GEOMETRY or JSON columns and requires expression to be used instead.

Regression in 7414704e88d73dafbcfbb85f9bc54cb6111439d3.

Backport of dfc77637ea5c1aa81caa72b1cf900e6931d61b54 from main
2024-02-04 09:24:38 +01:00
James Thorniley
f1fbd061ac [5.0.x] Fixed #35059 -- Ensured that ASGIHandler always sends the request_finished signal.
Prior to this work, when async tasks that process the request are cancelled due
to receiving an early "http.disconnect" ASGI message, the request_finished
signal was not being sent, potentially leading to resource leaks (such as
database connections).

This branch ensures that the request_finished signal is sent even in the case
of early termination of the response.

Regression in 64cea1e48f285ea2162c669208d95188b32bbc82.

Co-authored-by: Natalia <124304+nessita@users.noreply.github.com>
Co-authored-by: Carlton Gibson <carlton.gibson@noumenal.es>

Backport of 11393ab1316f973c5fbb534305750740d909b4e4 from main
2024-01-31 14:45:44 -03:00
Mariusz Felisiak
7453d6a807 [5.0.x] Fixed #35159 -- Fixed dumpdata crash when base querysets use prefetch_related().
Regression in 139135627650ed6aaaf4c755b82c3bd43f2b8f51
following deprecation in edbf930287cb72e9afab1f7208c24b1146b0c4ec.

Thanks Andrea F for the report.
Backport of 38eaf2f21a2398a8dd8444f6df3723898cb5fe2a from main
2024-01-31 16:10:50 +01:00
Nicolas Delaby
a5440054d2 [5.0.x] Fixed #35135 -- Made FilteredRelation raise ValueError on querysets as rhs.
Regression in 59f475470494ce5b8cbff816b1e5dafcbd10a3a3.

Backport of 820c5f1bacd41713bd30d8b5fefb66752ff15c4c from main
2024-01-30 05:54:39 +01:00
Natalia
f588c444fd [5.0.x] Added stub release notes and release date for 5.0.2, 4.2.10, and 3.2.24.
Backport of 06d0a1bd56a9899c351ca047a05813e8dd6a4e17 from main
2024-01-29 11:47:13 -03:00
Claude Paroz
3cc35aafab [5.0.x] Updated translations from Transifex. 2024-01-29 05:22:31 +01:00
Mariusz Felisiak
ee78fe390d [5.0.x] Fixed #35127 -- Made Model.full_clean() ignore GeneratedFields.
Thanks Claude Paroz for the report.

Regression in f333e3513e8bdf5ffeb6eeb63021c230082e6f95.
Backport of 4879907223d70ee1a82474d9286ccfa5dae96971 from main
2024-01-19 08:56:14 +01:00
Salvo Polizzi
4ed1423de4 [5.0.x] Fixed #35121 -- Corrected color for links in the admin.
Thanks Collin Anderson for the report.

Regression in 6ad2738a8f32b94cbae742f212080fadf2dee421.

Backport of 10c7c7320baf1c655fcb91202169d77725c9c4bd from main
2024-01-18 14:07:23 +01:00
Sarah Boyce
4cba6748a6 [5.0.x] Fixed #35087 -- Reallowed filtering against foreign keys not listed in ModelAdmin.list_filters.
Regression in f80669d2f5a5f1db9e9b73ca893fefba34f955e7.

Backport of a9094ec1f43dca7f2a649327afcd5e6226b4959c from main
2024-01-08 14:25:32 +01:00
Mariusz Felisiak
abb2448f17 [5.0.x] Added stub release notes for 5.0.2.
Backport of f412add786dfc18424eee6281ec8cc97220b04fc from main
2024-01-02 10:35:04 +01:00