summaryrefslogtreecommitdiff
path: root/tests/custom_lookups
diff options
context:
space:
mode:
authorSimon Charette <charette.s@gmail.com>2022-06-19 23:46:22 -0400
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2022-07-06 07:40:07 +0200
commit877c800f255ccaa7abde1fb944de45d1616f5cc9 (patch)
tree1fd6fa46ea847249eab6339213d4de5ee8f05f65 /tests/custom_lookups
parent73766c118781a7f7052bf0a5fbee38b944964e31 (diff)
downloaddjango-877c800f255ccaa7abde1fb944de45d1616f5cc9.tar.gz
Refs CVE-2022-34265 -- Properly escaped Extract() and Trunc() parameters.
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
Diffstat (limited to 'tests/custom_lookups')
-rw-r--r--tests/custom_lookups/tests.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/custom_lookups/tests.py b/tests/custom_lookups/tests.py
index ece67a46a5..b730d7b5e1 100644
--- a/tests/custom_lookups/tests.py
+++ b/tests/custom_lookups/tests.py
@@ -75,7 +75,7 @@ class YearTransform(models.Transform):
def as_sql(self, compiler, connection):
lhs_sql, params = compiler.compile(self.lhs)
- return connection.ops.date_extract_sql("year", lhs_sql), params
+ return connection.ops.date_extract_sql("year", lhs_sql, params)
@property
def output_field(self):