Opened 8 years ago

Closed 5 years ago

#11150 closed Bug (fixed)

ImageField validation depend on cStringIO

Reported by: Vladimir Dmitriev Owned by: nobody
Component: Forms Version: master
Severity: Normal Keywords:
Cc: vldmit@… Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

I've found that ImageField clean() method depend on reset() method of cStringIO library, and this breaks up StringIO compatibility. As a result, ValidationError is raised on uploading images on systems without cStringIO. I think it's better to use equivalent seek(0) method which is compatible with both StringIO and cStringIO.

Attachments (2)

imagefield_clean.patch (631 bytes) - added by Vladimir Dmitriev 8 years ago.
11150-2.diff (1.6 KB) - added by Claude Paroz 5 years ago.
Patch including test

Download all attachments as: .zip

Change History (10)

Changed 8 years ago by Vladimir Dmitriev

Attachment: imagefield_clean.patch added

comment:1 Changed 7 years ago by Alex Gaynor

Triage Stage: UnreviewedAccepted

comment:2 Changed 6 years ago by Alex Gaynor

Needs tests: set
Severity: Normal
Type: Uncategorized

comment:3 Changed 6 years ago by Julien Phalip

Type: UncategorizedBug

comment:4 Changed 5 years ago by Aymeric Augustin

UI/UX: unset

Change UI/UX from NULL to False.

comment:5 Changed 5 years ago by Aymeric Augustin

Easy pickings: unset

Change Easy pickings from NULL to False.

Changed 5 years ago by Claude Paroz

Attachment: 11150-2.diff added

Patch including test

comment:6 Changed 5 years ago by Claude Paroz

Needs tests: unset

comment:7 Changed 5 years ago by Aymeric Augustin

Triage Stage: AcceptedReady for checkin

comment:8 Changed 5 years ago by Claude Paroz

Resolution: fixed
Status: newclosed

In [17825]:

Fixed #11150 -- Removed dependency on cStringIO in ImageField validation. Thanks vvd for the report.

Note: See TracTickets for help on using tickets.
Back to Top