#35607: Improve Storage base backend API flexibility to allow filename
validation
to be overridden safely
-------------------------------------+-------------------------------------
Reporter: Natalia Bidart | Owner: Mohammad
Type: | Salehi
Cleanup/optimization | Status: assigned
Component: File | Version:
uploads/storage |
Severity: Normal | Resolution:
Keywords: storages | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Mohammad Salehi):
Replying to [comment:1 Natalia Bidart]:
I want to write these tests for the functions get_available_name,
generate_filename, get_valid_name, and validate_file_name:
1- Where there is double dots in filename-> "../file.ext"
2_ If there is an unusual character in the filename, include one of the
following characters: ^ @ # $ % & * ( ) + = { } | \ / : ; ' " < > ? for
exapmle ->
"[email protected]"
3_ Where there is long filename ->
"a_very_very_very_long_filename_that_exceeds_the_usual_limits_of_a_filesystem.ext"
4_ Where there is filename without extension -> "filename"
5_ Where there is filename with hidden extension -> "filename."
Is this ok? Natalia Bidart[]
--
Ticket URL: <https://code.djangoproject.com/ticket/35607#comment:5>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/01070191031c5b7a-a0a120bd-fae8-452a-bfba-00d706237910-000000%40eu-central-1.amazonses.com.