Opened 6 years ago

Closed 3 years ago

#11150 closed Bug (fixed)

ImageField validation depend on cStringIO

Reported by: vvd 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 vvd 6 years ago.
11150-2.diff (1.6 KB) - added by claudep 4 years ago.
Patch including test

Download all attachments as: .zip

Change History (10)

Changed 6 years ago by vvd

comment:1 Changed 6 years ago by Alex

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

comment:2 Changed 4 years ago by Alex

  • Needs tests set
  • Severity set to Normal
  • Type set to Uncategorized

comment:3 Changed 4 years ago by julien

  • Type changed from Uncategorized to Bug

comment:4 Changed 4 years ago by aaugustin

  • UI/UX unset

Change UI/UX from NULL to False.

comment:5 Changed 4 years ago by aaugustin

  • Easy pickings unset

Change Easy pickings from NULL to False.

Changed 4 years ago by claudep

Patch including test

comment:6 Changed 4 years ago by claudep

  • Needs tests unset

comment:7 Changed 3 years ago by aaugustin

  • Triage Stage changed from Accepted to Ready for checkin

comment:8 Changed 3 years ago by claudep

  • Resolution set to fixed
  • Status changed from new to 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