#33965: Improve docs for PIL validation of ImageField
-------------------------------------+-------------------------------------
     Reporter:  Timothy Schilling    |                    Owner:  Alex
         Type:                       |  Morega
  Cleanup/optimization               |                   Status:  closed
    Component:  Documentation        |                  Version:  4.1
     Severity:  Normal               |               Resolution:  fixed
     Keywords:  documentation        |             Triage Stage:  Ready for
  imagefield                         |  checkin
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by Timothy Schilling):

 Is there any concern that users will be running random byte code? This on
 the face of it, looks like code that should not be blindly copied and
 pasted into a codebase because it's difficult to parse what the following
 actually is. Using PIL to generate an image is more declarative and
 explicit in what it's doing.

 {{{
 >>> img = BytesIO(
 ...     b'GIF89a\x01\x00\x01\x00\x00\x00\x00!\xf9\x04\x01\x00\x00\x00'
 ...     b'\x00,\x00\x00\x00\x00\x01\x00\x01\x00\x00\x02\x01\x00\x00'
 ... )
 }}}

-- 
Ticket URL: <https://code.djangoproject.com/ticket/33965#comment:7>
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/01070182f3feb024-a39f4b75-964f-4763-9a03-4909792c827a-000000%40eu-central-1.amazonses.com.

Reply via email to