diff options
| author | Jacob Walls <jacobtylerwalls@gmail.com> | 2025-09-24 15:56:03 -0400 |
|---|---|---|
| committer | Natalia <124304+nessita@users.noreply.github.com> | 2025-11-05 09:20:57 -0300 |
| commit | 3c3f46357718166069948625354b8315a8505262 (patch) | |
| tree | e3d487ef54660a404190f7b50a965084802fd10d /tests | |
| parent | 98e642c69181c942d60a10ca0085d48c6b3068bb (diff) | |
Refs CVE-2025-64459 -- Avoided propagating invalid arguments to Q on dictionary expansion.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/queries/tests.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/queries/tests.py b/tests/queries/tests.py index 4ee4572719..51d1915c97 100644 --- a/tests/queries/tests.py +++ b/tests/queries/tests.py @@ -4516,6 +4516,14 @@ class TestInvalidValuesRelation(SimpleTestCase): Annotation.objects.filter(tag__in=[123, "abc"]) +class TestInvalidFilterArguments(TestCase): + def test_filter_rejects_invalid_arguments(self): + school = School.objects.create() + msg = "The following kwargs are invalid: '_connector', '_negated'" + with self.assertRaisesMessage(TypeError, msg): + School.objects.filter(pk=school.pk, _negated=True, _connector="evil") + + class TestTicket24605(TestCase): def test_ticket_24605(self): """ |
