<feed xmlns='http://www.w3.org/2005/Atom'>
<title>django.git/django/db/models/sql/compiler.py, branch 4.2.29</title>
<subtitle>django
</subtitle>
<id>http://cgit.adnoto.dev/django.git/atom?h=4.2.29</id>
<link rel='self' href='http://cgit.adnoto.dev/django.git/atom?h=4.2.29'/>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/django.git/'/>
<updated>2026-02-03T13:26:22Z</updated>
<entry>
<title>[4.2.x] Fixed CVE-2026-1312 -- Protected order_by() from SQL injection via aliases with periods.</title>
<updated>2026-02-03T13:26:22Z</updated>
<author>
<name>Jacob Walls</name>
<email>jacobtylerwalls@gmail.com</email>
</author>
<published>2026-01-21T22:53:52Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/django.git/commit/?id=90f5b10784ba5bf369caed87640e2b4394ea3314'/>
<id>urn:sha1:90f5b10784ba5bf369caed87640e2b4394ea3314</id>
<content type='text'>
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.
</content>
</entry>
<entry>
<title>[4.2.x] Fixed #34580 -- Avoided unnecessary computation of selected expressions in SQLCompiler.</title>
<updated>2023-05-22T05:57:05Z</updated>
<author>
<name>Simon Charette</name>
<email>charette.s@gmail.com</email>
</author>
<published>2023-05-21T15:59:56Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/django.git/commit/?id=e1c00f8b361bf89deb68733bbc5189734bbcd6b5'/>
<id>urn:sha1:e1c00f8b361bf89deb68733bbc5189734bbcd6b5</id>
<content type='text'>
Performance regression in 278881e37619278789942513916acafaa88d26f3.

Co-authored-by: David Smith &lt;smithdc@gmail.com&gt;

Backport of 98f6ada0e2058d67d91fb6c16482411ec2ca0967 from main
</content>
</entry>
<entry>
<title>[4.2.x] Fixed #34368 -- Made subquery raise NotSupportedError when referencing outer window expression.</title>
<updated>2023-02-27T08:46:30Z</updated>
<author>
<name>Simon Charette</name>
<email>charette.s@gmail.com</email>
</author>
<published>2023-02-26T12:43:00Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/django.git/commit/?id=fc15d11f2eb26fe3d5c946e69223880bfe53e92b'/>
<id>urn:sha1:fc15d11f2eb26fe3d5c946e69223880bfe53e92b</id>
<content type='text'>
Regression in f387d024fc75569d2a4a338bfda76cc2f328f627.

Co-authored-by: Jannis Vajen &lt;jvajen@gmail.com&gt;

Backport of c67ea79aa981ae82595d89f8018a41fcd842e7c9 from main
</content>
</entry>
<entry>
<title>[4.2.x] Fixed #34372 -- Fixed queryset crash on order by aggregation using OrderBy.</title>
<updated>2023-02-27T06:10:45Z</updated>
<author>
<name>Simon Charette</name>
<email>charette.s@gmail.com</email>
</author>
<published>2023-02-27T06:10:19Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/django.git/commit/?id=872dade29c8a4b9e82920a85c698fcef8ed332ee'/>
<id>urn:sha1:872dade29c8a4b9e82920a85c698fcef8ed332ee</id>
<content type='text'>
Regression in 278881e37619278789942513916acafaa88d26f3 caused by a lack
of expression copying when an OrderBy expression is explicitly provided.

Thanks Jannis Vajen for the report and regression test.
Backport of b15f162f252610e3b510ade465549769ab4356cf from main
</content>
</entry>
<entry>
<title>[4.2.x] Fixed #34346 -- Ordered selected expressions by position.</title>
<updated>2023-02-20T05:22:18Z</updated>
<author>
<name>Simon Charette</name>
<email>charette.s@gmail.com</email>
</author>
<published>2023-02-18T01:38:08Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/django.git/commit/?id=aab25a69dd09e6717ff86175ff62c29b847a7791'/>
<id>urn:sha1:aab25a69dd09e6717ff86175ff62c29b847a7791</id>
<content type='text'>
Used the same approach as for #34176 by using selected expressions
position to prevent ambiguous aliases in collisions.

Thanks henribru for the report.

Regression in 04518e310d4552ff7595a34f5a7f93487d78a406.

Backport of 278881e37619278789942513916acafaa88d26f3 from main
</content>
</entry>
<entry>
<title>[4.2.x] Fixed #34227 -- Fixed QuerySet.select_related() with multi-level FilteredRelation.</title>
<updated>2023-01-24T09:52:01Z</updated>
<author>
<name>朱穆穆</name>
<email>mumu.zhu@feat.com</email>
</author>
<published>2022-12-29T02:23:46Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/django.git/commit/?id=f23a85337a93cef7bb351f17e61f50841953a74a'/>
<id>urn:sha1:f23a85337a93cef7bb351f17e61f50841953a74a</id>
<content type='text'>
Backport of d3c93cdc597e0efc2815111c04dd5a427432ed37 from main
</content>
</entry>
<entry>
<title>[4.2.x] Fixed #34267 -- Fixed sliced QuerySet.union() crash.</title>
<updated>2023-01-20T08:25:26Z</updated>
<author>
<name>Francesco Panico</name>
<email>panico.francesco@gmail.com</email>
</author>
<published>2023-01-18T22:42:53Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/django.git/commit/?id=84927e110e813c3bea6a600e4474eb577e15f2b9'/>
<id>urn:sha1:84927e110e813c3bea6a600e4474eb577e15f2b9</id>
<content type='text'>
Regression in 3d734c09ff0138441dfe0a59010435871d17950f.

Thanks Raphaël Stefanini for the report.

Backport of cc8aa6bf9c127a493e6dd005012b9e6397b3f319 from main
</content>
</entry>
<entry>
<title>Fixed #34176 -- Fixed grouping by ambiguous aliases.</title>
<updated>2023-01-09T09:52:51Z</updated>
<author>
<name>Simon Charette</name>
<email>charette.s@gmail.com</email>
</author>
<published>2023-01-06T14:10:16Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/django.git/commit/?id=dd68af62b2b27ece50d434f6a351877212e15c3f'/>
<id>urn:sha1:dd68af62b2b27ece50d434f6a351877212e15c3f</id>
<content type='text'>
Regression in b7b28c7c189615543218e81319473888bc46d831.

Refs #31377.

Thanks Shai Berger for the report and reviews.

test_aggregation_subquery_annotation_values_collision() has been
updated as queries that are explicitly grouped by a subquery should
always be grouped by it and not its outer columns even if its alias
collides with referenced table columns. This was not possible to
accomplish at the time 10866a10 landed because we didn't have compiler
level handling of colliding aliases.
</content>
</entry>
<entry>
<title>Simplified SQLCompiler.get_group_by() a bit.</title>
<updated>2023-01-04T07:32:27Z</updated>
<author>
<name>Simon Charette</name>
<email>charette.s@gmail.com</email>
</author>
<published>2022-11-23T08:50:26Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/django.git/commit/?id=0d3ccf7512edd48ac2461b7140977c16ee479d3e'/>
<id>urn:sha1:0d3ccf7512edd48ac2461b7140977c16ee479d3e</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Fixed #34226 -- Fixed QuerySet.select_related() with multiple FilteredRelations to the OneToOneField.</title>
<updated>2022-12-27T05:39:38Z</updated>
<author>
<name>朱穆穆</name>
<email>mumu.zhu@feat.com</email>
</author>
<published>2022-12-26T06:13:44Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/django.git/commit/?id=bbeeb45161da251bb7297b60d6155e7b4efdbc9f'/>
<id>urn:sha1:bbeeb45161da251bb7297b60d6155e7b4efdbc9f</id>
<content type='text'>
</content>
</entry>
</feed>
