diff options
| author | Natalia <124304+nessita@users.noreply.github.com> | 2024-03-20 13:55:21 -0300 |
|---|---|---|
| committer | Natalia <124304+nessita@users.noreply.github.com> | 2024-07-09 09:21:19 -0300 |
| commit | fe4a0bbe2088d0c2b331216dad21ccd0bb3ee80d (patch) | |
| tree | b392eb2a3343f7a094f7caf3b1cd145f5cedb5e2 /tests/file_uploads | |
| parent | 5d8645857936c142a3973694799c52165e2bdcdb (diff) | |
Fixed CVE-2024-39330 -- Added extra file name validation in Storage's save method.
Thanks to Josh Schneier for the report, and to Carlton Gibson and Sarah
Boyce for the reviews.
Diffstat (limited to 'tests/file_uploads')
| -rw-r--r-- | tests/file_uploads/tests.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/file_uploads/tests.py b/tests/file_uploads/tests.py index 6db8f9022d..c46f5a490b 100644 --- a/tests/file_uploads/tests.py +++ b/tests/file_uploads/tests.py @@ -880,7 +880,7 @@ class DirectoryCreationTests(SimpleTestCase): default_storage.delete(UPLOAD_TO) # Create a file with the upload directory name with SimpleUploadedFile(UPLOAD_TO, b"x") as file: - default_storage.save(UPLOAD_TO, file) + default_storage.save(UPLOAD_FOLDER, file) self.addCleanup(default_storage.delete, UPLOAD_TO) msg = "%s exists and is not a directory." % UPLOAD_TO with self.assertRaisesMessage(FileExistsError, msg): |
