ValueError while validating image file using Python Imaging Lib
Bug #50616 reported by
Diogo Matsubara
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Launchpad itself |
Fix Released
|
Critical
|
Unassigned |
Bug Description
We use the Python Imaging Library to identify the image type uploaded on the +edithackergotchi page.
Usually when the PIL can't identify an image type, it raises a IOError, but it might raise a "ValueError: cannot read this XPM file" when uploading a broken XPM file. When that happens we see OOPS-171A222, OOPS-379D69, OOPS-1595L2717
The same applies when you try to upload a team emblem through +editemblem or a icon for your product using +branding
Related branches
lp:~sinzui/launchpad/field-errors-0
- Graham Binns (community): Approve (code)
-
Diff: 543 lines (+128/-228)3 files modifiedlib/lp/app/widgets/doc/image-widget.txt (+95/-227)
lib/lp/services/fields/__init__.py (+1/-1)
lib/lp/services/fields/tests/test_fields.py (+32/-0)
description: | updated |
description: | updated |
Changed in launchpad: | |
assignee: | salgado → nobody |
description: | updated |
Changed in launchpad-foundations: | |
status: | Confirmed → Triaged |
importance: | Undecided → Low |
Changed in launchpad: | |
importance: | Low → Critical |
Changed in launchpad: | |
milestone: | none → 11.03 |
tags: |
added: qa-ok removed: qa-needstesting |
Changed in launchpad: | |
status: | Fix Committed → Fix Released |
Changed in launchpad: | |
assignee: | Curtis Hovey (sinzui) → nobody |
To post a comment you must log in.
<SteveA> matsubara: for 50616, I think we should try-except, and such images should be rejected as invalid
<salgado> agreed. that's what I had in mind
<SteveA> but we should also record the fact they were rejected, and the image involved
<SteveA> just in this case, not in the general case