mirror of
https://github.com/django/django.git
synced 2025-10-31 09:41:08 +00:00
[5.0.x] Fixed CVE-2024-42005 -- Mitigated QuerySet.values() SQL injection attacks against JSON fields.
Thanks Eyal (eyalgabay) for the report.
This commit is contained in:
committed by
Sarah Boyce
parent
523da8771b
commit
32ebcbf2e1
@@ -2446,6 +2446,8 @@ class Query(BaseExpression):
|
||||
self.has_select_fields = True
|
||||
|
||||
if fields:
|
||||
for field in fields:
|
||||
self.check_alias(field)
|
||||
field_names = []
|
||||
extra_names = []
|
||||
annotation_names = []
|
||||
|
||||
Reference in New Issue
Block a user