summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorSimon Charette <charette.s@gmail.com>2026-02-01 17:02:49 -0500
committerJacob Walls <jacobtylerwalls@gmail.com>2026-03-19 12:24:17 -0400
commit5146449a38222dc74f8f1ba88a7a7ef681e93101 (patch)
treecfe4afc77f73d7c0a35b754da075608b3294499b /tests
parentf05fac88c4699c6d04a8f1ac3328cf6c7bd39228 (diff)
Refs #36795 -- Removed unnecessary prohibits_dollar_signs_in_column_aliases feature flag.
Now that user provided aliases are systematically quoted there is no need to disallow the usage of the dollar sign on Postgres.
Diffstat (limited to 'tests')
-rw-r--r--tests/annotations/tests.py14
1 files changed, 0 insertions, 14 deletions
diff --git a/tests/annotations/tests.py b/tests/annotations/tests.py
index 42869bf131..b94f44ef22 100644
--- a/tests/annotations/tests.py
+++ b/tests/annotations/tests.py
@@ -1574,20 +1574,6 @@ class AliasTests(TestCase):
with self.assertRaisesMessage(ValueError, msg):
Book.objects.alias(**{crafted_alias: FilteredRelation("authors")})
- def test_alias_filtered_relation_sql_injection_dollar_sign(self):
- qs = Book.objects.alias(
- **{"crafted_alia$": FilteredRelation("authors")}
- ).values("name", "crafted_alia$")
- if connection.features.prohibits_dollar_signs_in_column_aliases:
- msg = (
- "Dollar signs are not permitted in column aliases on "
- f"{connection.display_name}."
- )
- with self.assertRaisesMessage(ValueError, msg):
- list(qs)
- else:
- self.assertEqual(qs.first()["name"], self.b1.name)
-
def test_values_wrong_alias(self):
expected_message = (
"Cannot resolve keyword 'alias_typo' into field. Choices are: %s"