#28165: FileExtensionValidator's allowed_extensions must be given in lower case
-------------------------------------+-------------------------------------
Reporter: Arne de Laat | Owner: nobody
Type: Bug | Status: new
Component: File | Version: 1.11
uploads/storage |
Severity: Normal | Resolution:
Keywords: validators | Triage Stage:
filefield | Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Arne de Laat):
The problem with that is that it would be less obvious, why not simply
support case insensitive matching?
Additionally if you retrieve the extensions from some source, as is done
to validate images (using the extensions supported by Pillow) you need to
ensure those are already lowered, or add some additional code to ensure
they are.
Also, the current validation error is also a bit unclear `'pdf' is not
allowed. Allowed extensions are: 'PDF'`, even if the original file
extension is `PDF`. So to clarify that error some code would need to be
changed anyway.
--
Ticket URL: <https://code.djangoproject.com/ticket/28165#comment:2>
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 post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/064.35ffff9817f7922cd500f870b49abb91%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.