#27358 closed Cleanup/optimization (fixed)
Add a system check for FileField upload_to starting with a slash
Reported by: | Tim Graham | Owned by: | Henry Dang |
---|---|---|---|
Component: | Core (System checks) | Version: | 1.10 |
Severity: | Normal | Keywords: | |
Cc: | olivier.tabone@… | Triage Stage: | Accepted |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | yes | UI/UX: | no |
Description
A leading slash in upload_to
seems to be a gotcha for some people new to Django (just came up in #django too).
The message could be something like "Remove the leading slash on upload_to as it should be a relative path."
Change History (9)
comment:1 by , 8 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:2 by , 8 years ago
Has patch: | set |
---|---|
Patch needs improvement: | set |
comment:3 by , 8 years ago
Cc: | added |
---|
comment:4 by , 8 years ago
Owner: | changed from | to
---|
comment:6 by , 8 years ago
Would it be interesting to check for known potentially dangerous filenames (1), such as ../index.html
?
(1) https://www.owasp.org/index.php/Unrestricted_File_Upload#Other_Interesting_Test_Cases
Note:
See TracTickets
for help on using tickets.
PR with comments for improvement.