1
0
mirror of https://github.com/django/django.git synced 2025-06-20 02:49:12 +00:00

13 Commits

Author SHA1 Message Date
Natalia
a07ebec559 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>
2025-06-04 08:33:30 -03:00
Simon Charette
08187c94ed Fixed #36432 -- Fixed a prefetch_related crash on related target subclass queryset.
Regression in 626d77e52a3f247358514bcf51c761283968099c.

Refs #36116.

Thanks Cornelis Poppema for the excellent report.
2025-06-04 10:46:49 +02:00
Jake Howard
c075508b4d Fixed #36411 -- Made HttpRequest.get_preferred_type() consider media type parameters.
HttpRequest.get_preferred_type() did not account for parameters in
Accept header media types (e.g., "text/vcard; version=3.0"). This caused
incorrect content negotiation when multiple types differed only by
parameters, reducing specificity as per RFC 7231 section 5.3.2
(https://datatracker.ietf.org/doc/html/rfc7231.html#section-5.3.2).

This fix updates get_preferred_type() to treat media types with
parameters as distinct, allowing more precise and standards-compliant
matching.

Thanks to magicfelix for the report, and to David Sanders and Sarah
Boyce for the reviews.
2025-06-03 16:10:41 -03:00
Jacob Walls
26313bc219 Fixed #36416 -- Made QuerySet.in_bulk() account for composite pks in id_list. 2025-06-03 18:45:15 +03:00
Blayze
90429625a8 Fixed #36423 -- Prevented filter_horizontal buttons from intercepting form submission.
In the admin's filter_horizontal widget, optional action buttons like
"Choose all", "Remove all", etc. were changed from `<a>` to `<button>`
elements in #34619, but without specifying `type="button"`. As a result,
when pressing Enter while focused on a form input, these buttons could
be triggered and intercept form submission.

Explicitly set `type="button"` on these control buttons to prevent them
from acting as submit buttons.

Thanks Antoliny Lee for the quick triage and review.

Regression in 857b1048d53ebf5fc5581c110e85c212b81ca83a.
2025-06-02 22:25:14 -03:00
Natalia
1a74434399 Added stub release notes and release date for 5.2.2, 5.1.10, and 4.2.22. 2025-05-28 10:03:06 -03:00
Adam Johnson
c2615a0500 Fixed #36405 -- Fixed Aggregate.order_by using OuterRef.
co-authored-by: Simon Charette <charette.s@gmail.com>
2025-05-23 16:15:59 +02:00
Adam Johnson
b8e5a8a9a2 Fixed #36404 -- Fixed Aggregate.filter using OuterRef.
Regression in a76035e925ff4e6d8676c65cb135c74b993b1039.
Thank you to Simon Charette for the review.

co-authored-by: Simon Charette <charette.s@gmail.com>
2025-05-23 15:17:20 +02:00
Sarah Boyce
1704c49a9b Fixed #36390 -- Deprecated RemoteUserMiddleware subclasses missing aprocess_request().
Regression in 50f89ae850f6b4e35819fe725a08c7e579bfd099.
Thank you to shamoon for the report and Natalia Bidart for the review.
2025-05-23 10:22:36 +02:00
Colleen Dunlap
802baf5da5 Fixed #36388 -- Made QuerySet.union() return self when called with no arguments.
Regression in 9cb8baa0c4fa2c10789c5c8b65f4465932d4d172.
Thank you to Antoine Humeau for the report and Simon Charette for the review.
2025-05-19 10:34:14 +02:00
Jacob Walls
994dc6d8a1 Fixed #36392 -- Raised ValueError when subquery referencing composite pk selects too many columns. 2025-05-16 08:19:38 +02:00
Simon Charette
8be0c0d690 Fixed #36373 -- Fixed select_related() crash on foreign object for a composite pk.
Thanks Jacob Walls for the report and Sarah for the in-depth review.
2025-05-12 12:33:07 +01:00
Natalia
d8397bf6cd Added stub release notes for 5.2.2. 2025-05-07 10:56:00 -03:00