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 08:28:10 +0100 |
| commit | 7bd1ddf1d81e9120c28322ee2a0b9c11941a6af2 (patch) | |
| tree | 59f50d3d449d2f8239391a1e03f67db143d538b4 | |
| parent | 57b0229421ad64fea6ba50a8628e6aedce017152 (diff) | |
[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.
| -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 4c8d14bf9a..8535aa2e8c 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, ) |
