summaryrefslogtreecommitdiff
path: root/tests/auth_tests/urls_admin.py
diff options
context:
space:
mode:
authorJacob Walls <jacobtylerwalls@gmail.com>2026-01-21 17:53:52 -0500
committerJacob Walls <jacobtylerwalls@gmail.com>2026-02-03 08:04:49 -0500
commit15e70cb83e6f7a9a2a2f651f30b28b5cb20febeb (patch)
tree662e23b3e0151d0fa335158968540fbd7911e236 /tests/auth_tests/urls_admin.py
parent0c0f5c2178c01ada5410cd53b4b207bf7858b952 (diff)
[6.0.x] Fixed CVE-2026-1312 -- Protected order_by() from SQL injection via 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.
Diffstat (limited to 'tests/auth_tests/urls_admin.py')
0 files changed, 0 insertions, 0 deletions