mirror of
https://github.com/django/django.git
synced 2025-04-08 23:46:43 +00:00
[4.2.x] Refs #34060 -- Adjusted CVE-2024-53908 regression test for psycopg2.
The lack of explicit cast for JSON literals on psycopg2 is fixed on 5.1+ by 0d8fbe2ade29f1b7bd9e6ba7a0281f5478603a43 but didn't qualify for a backport to stable/4.2.x.
This commit is contained in:
parent
57b0229421
commit
7bd1ddf1d8
@ -611,7 +611,7 @@ class TestQuerying(TestCase):
|
||||
def test_has_key_literal_lookup(self):
|
||||
self.assertSequenceEqual(
|
||||
NullableJSONModel.objects.filter(
|
||||
HasKey(Value({"foo": "bar"}, JSONField()), "foo")
|
||||
HasKey(Cast(Value({"foo": "bar"}, JSONField()), JSONField()), "foo")
|
||||
).order_by("id"),
|
||||
self.objs,
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user