Opened 17 years ago

Closed 15 years ago

#11150 closed Bug (fixed)

ImageField validation depend on cStringIO

Reported by: Vladimir Dmitriev Owned by: nobody
Component: Forms Version: dev
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 17 years ago.
11150-2.diff​ (1.6 KB ) - added by Claude Paroz 15 years ago.
Patch including test

Download all attachments as: .zip

Change History (10)

by Vladimir Dmitriev, 17 years ago

Attachment: imagefield_clean.patch​ added

comment:1 by Alex Gaynor, 17 years ago

Triage Stage: Unreviewed → Accepted

comment:2 by Alex Gaynor, 16 years ago

Needs tests: set
Severity: → Normal
Type: → Uncategorized

comment:3 by Julien Phalip, 15 years ago

Type: Uncategorized → Bug

comment:4 by Aymeric Augustin, 15 years ago

UI/UX: unset

Change UI/UX from NULL to False.

comment:5 by Aymeric Augustin, 15 years ago

Easy pickings: unset

Change Easy pickings from NULL to False.

by Claude Paroz, 15 years ago

Attachment: 11150-2.diff​ added

Patch including test

comment:6 by Claude Paroz, 15 years ago

Needs tests: unset

comment:7 by Aymeric Augustin, 15 years ago

Triage Stage: Accepted → Ready for checkin

comment:8 by Claude Paroz, 15 years ago

Resolution: → fixed
Status: new → closed

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