mirror of
https://github.com/django/django.git
synced 2025-10-27 07:36:08 +00:00
[4.2.x] Fixed CVE-2023-31047, Fixed #31710 -- Prevented potential bypass of validation when uploading multiple files using one form field.
Thanks Moataz Al-Sharida and nawaik for reports. Co-authored-by: Shai Berger <shai@platonix.com> Co-authored-by: nessita <124304+nessita@users.noreply.github.com>
This commit is contained in:
@@ -242,3 +242,8 @@ class ClearableFileInputTest(WidgetTest):
|
||||
'<input type="file" name="clearable_file" id="id_clearable_file"></div>',
|
||||
form.render(),
|
||||
)
|
||||
|
||||
def test_multiple_error(self):
|
||||
msg = "ClearableFileInput doesn't support uploading multiple files."
|
||||
with self.assertRaisesMessage(ValueError, msg):
|
||||
ClearableFileInput(attrs={"multiple": True})
|
||||
|
||||
Reference in New Issue
Block a user