<feed xmlns='http://www.w3.org/2005/Atom'>
<title>django.git/django/db/models/sql/query.py, branch main</title>
<subtitle>django
</subtitle>
<id>http://cgit.adnoto.dev/django.git/atom?h=main</id>
<link rel='self' href='http://cgit.adnoto.dev/django.git/atom?h=main'/>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/django.git/'/>
<updated>2026-04-19T08:03:11Z</updated>
<entry>
<title>Fixed #37047 -- Fixed crash in Query.orderby_issubset_groupby for descending and random order_by strings.</title>
<updated>2026-04-19T08:03:11Z</updated>
<author>
<name>Anže Pečar</name>
<email>anze@pecar.me</email>
</author>
<published>2026-04-18T11:54:55Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/django.git/commit/?id=a284a49153f005f2a7af087025e5112ba06cbd5f'/>
<id>urn:sha1:a284a49153f005f2a7af087025e5112ba06cbd5f</id>
<content type='text'>
Run this example:

```python
User.objects.values("is_staff").annotate(latest=Max("date_joined")).order_by("-latest").count()
```

You should see the following exception:

```
django.core.exceptions.FieldError: Cannot resolve keyword '-latest' into field.
```

Regression in 2ce5cb0f7a4618dfdc5f5c10e53e2e9b9543d298.
</content>
</entry>
<entry>
<title>Fixed #20024 -- Fixed handling of __in lookups with None in exclude().</title>
<updated>2026-04-02T15:24:26Z</updated>
<author>
<name>Eddy Adegnandjou</name>
<email>adegnandjoueddy12@gmail.com</email>
</author>
<published>2025-10-31T08:00:41Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/django.git/commit/?id=cec10f992be8eed5ed90506375ae5794cbb7069e'/>
<id>urn:sha1:cec10f992be8eed5ed90506375ae5794cbb7069e</id>
<content type='text'>
Thanks Simon Charette and Tim Graham for reviews, and Jason Hall for a
prior iteration.
</content>
</entry>
<entry>
<title>Refs CVE-2026-1312 -- Raised ValueError when FilteredRelation aliases contain periods.</title>
<updated>2026-02-03T12:56:04Z</updated>
<author>
<name>Jacob Walls</name>
<email>jacobtylerwalls@gmail.com</email>
</author>
<published>2026-01-21T23:00:13Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/django.git/commit/?id=005d60d97c4dfb117503bdb6f2facfcaf9315d84'/>
<id>urn:sha1:005d60d97c4dfb117503bdb6f2facfcaf9315d84</id>
<content type='text'>
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.
</content>
</entry>
<entry>
<title>Fixed CVE-2026-1287 -- Protected against SQL injection in column aliases via control characters.</title>
<updated>2026-02-03T12:55:04Z</updated>
<author>
<name>Jake Howard</name>
<email>git@theorangeone.net</email>
</author>
<published>2026-01-21T11:14:48Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/django.git/commit/?id=e891a84c7ef9962bfcc3b4685690219542f86a22'/>
<id>urn:sha1:e891a84c7ef9962bfcc3b4685690219542f86a22</id>
<content type='text'>
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.
</content>
</entry>
<entry>
<title>Fixed #36352 -- Improved error message for fields excluded by prior values()/values_list() calls.</title>
<updated>2026-01-16T15:28:14Z</updated>
<author>
<name>JaeHyuck Sa</name>
<email>wogur981208@gmail.com</email>
</author>
<published>2026-01-15T15:29:25Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/django.git/commit/?id=0239e86f387127dace7273208c300b33a065e021'/>
<id>urn:sha1:0239e86f387127dace7273208c300b33a065e021</id>
<content type='text'>
Signed-off-by: JaeHyuck Sa &lt;wogur981208@gmail.com&gt;
</content>
</entry>
<entry>
<title>Fixed #36821 -- Treated empty strings as NULL for iexact lookups on Oracle.</title>
<updated>2026-01-14T18:31:15Z</updated>
<author>
<name>JaeHyuck Sa</name>
<email>wogur981208@gmail.com</email>
</author>
<published>2026-01-14T15:09:14Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/django.git/commit/?id=4ce4ed72a4ddc7d101df0fd31f1d0e449d8af501'/>
<id>urn:sha1:4ce4ed72a4ddc7d101df0fd31f1d0e449d8af501</id>
<content type='text'>
Signed-off-by: JaeHyuck Sa &lt;wogur981208@gmail.com&gt;
</content>
</entry>
<entry>
<title>Fixed #26434 -- Removed faulty clearing of ordering field when missing from explicit grouping.</title>
<updated>2025-12-15T20:23:51Z</updated>
<author>
<name>Michal Mládek</name>
<email>osvc.04923031@gmail.com</email>
</author>
<published>2025-05-26T16:37:34Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/django.git/commit/?id=2ce5cb0f7a4618dfdc5f5c10e53e2e9b9543d298'/>
<id>urn:sha1:2ce5cb0f7a4618dfdc5f5c10e53e2e9b9543d298</id>
<content type='text'>
Co-authored-by: Simon Charette &lt;charette.s@gmail.com&gt;
</content>
</entry>
<entry>
<title>Reverted "Fixed #26434 -- Removed faulty clearing of ordering field when missing from explicit grouping."</title>
<updated>2025-10-28T15:40:01Z</updated>
<author>
<name>Jacob Walls</name>
<email>jacobtylerwalls@gmail.com</email>
</author>
<published>2025-10-28T14:43:54Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/django.git/commit/?id=43933a1dca07047e95ec990d9289d0212668009e'/>
<id>urn:sha1:43933a1dca07047e95ec990d9289d0212668009e</id>
<content type='text'>
This reverts commit ea3a71c2d09f8281d8a50ed20e40e1fb13db5cd9.

The implementation was flawed, as self.group_by contains Cols, not aliases.
</content>
</entry>
<entry>
<title>Fixed #26434 -- Removed faulty clearing of ordering field when missing from explicit grouping.</title>
<updated>2025-10-27T19:11:19Z</updated>
<author>
<name>Michal Mládek</name>
<email>osvc.04923031@gmail.com</email>
</author>
<published>2025-05-26T16:37:34Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/django.git/commit/?id=ea3a71c2d09f8281d8a50ed20e40e1fb13db5cd9'/>
<id>urn:sha1:ea3a71c2d09f8281d8a50ed20e40e1fb13db5cd9</id>
<content type='text'>
Co-authored-by: Simon Charette &lt;charette.s@gmail.com&gt;
</content>
</entry>
<entry>
<title>Fixed CVE-2025-59681 -- Protected QuerySet.annotate(), alias(), aggregate(), and extra() against SQL injection in column aliases on MySQL/MariaDB.</title>
<updated>2025-10-01T12:11:45Z</updated>
<author>
<name>Mariusz Felisiak</name>
<email>felisiak.mariusz@gmail.com</email>
</author>
<published>2025-09-10T07:53:52Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/django.git/commit/?id=41b43c74bda19753c757036673ea9db74acf494a'/>
<id>urn:sha1:41b43c74bda19753c757036673ea9db74acf494a</id>
<content type='text'>
Thanks sw0rd1ight for the report.

Follow up to 93cae5cb2f9a4ef1514cf1a41f714fef08005200.
</content>
</entry>
</feed>
