-
-
Notifications
You must be signed in to change notification settings - Fork 32k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[3.1.x] Fixed #32718 -- Relaxed file name validation in FileField.
- Validate filename returned by FileField.upload_to() not a filename passed to the FileField.generate_filename() (upload_to() may completely ignored passed filename). - Allow relative paths (without dot segments) in the generated filename. Thanks to Jakub Kleň for the report and review. Thanks to all folks for checking this patch on existing projects. Thanks Florian Apolloner and Markus Holtermann for the discussion and implementation idea. Regression in 0b79eb3. Backport of b556999 from main.
- Loading branch information
Showing
7 changed files
with
134 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
=========================== | ||
Django 2.2.23 release notes | ||
=========================== | ||
|
||
*May 13, 2021* | ||
|
||
Django 2.2.23 fixes a regression in 2.2.21. | ||
|
||
Bugfixes | ||
======== | ||
|
||
* Fixed a regression in Django 2.2.21 where saving ``FileField`` would raise a | ||
``SuspiciousFileOperation`` even when a custom | ||
:attr:`~django.db.models.FileField.upload_to` returns a valid file path | ||
(:ticket:`32718`). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
=========================== | ||
Django 3.1.11 release notes | ||
=========================== | ||
|
||
*May 13, 2021* | ||
|
||
Django 3.1.11 fixes a regression in 3.1.9. | ||
|
||
Bugfixes | ||
======== | ||
|
||
* Fixed a regression in Django 3.1.9 where saving ``FileField`` would raise a | ||
``SuspiciousFileOperation`` even when a custom | ||
:attr:`~django.db.models.FileField.upload_to` returns a valid file path | ||
(:ticket:`32718`). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters