diff options
| author | Simon Charette <charette.s@gmail.com> | 2025-01-17 00:13:10 -0500 |
|---|---|---|
| committer | Sarah Boyce <42296566+sarahboyce@users.noreply.github.com> | 2025-01-17 10:12:29 +0100 |
| commit | 577cd7343a95c316070d34ff79f827ae3f5ba5e7 (patch) | |
| tree | e5b3ca37be47452ca8047beb1d5f134b95cc9e95 | |
| parent | 21dfd30d69b44f82d7361d4941a0987268bac55e (diff) | |
[5.0.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/5.0.x at the time.
| -rw-r--r-- | tests/model_fields/test_jsonfield.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/model_fields/test_jsonfield.py b/tests/model_fields/test_jsonfield.py index eb129370fb..690816d5b5 100644 --- a/tests/model_fields/test_jsonfield.py +++ b/tests/model_fields/test_jsonfield.py @@ -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, ) |
