Re: [Django] #24544: core.files.images.get_image_dimensions broken on some valid PNG images

2015-04-07 Thread Django
#24544: core.files.images.get_image_dimensions broken on some valid PNG images
--+
 Reporter:  artscoop  |Owner:  nobody
 Type:  Cleanup/optimization  |   Status:  closed
Component:  File uploads/storage  |  Version:  1.7
 Severity:  Normal|   Resolution:  fixed
 Keywords:  PIL   | Triage Stage:  Accepted
Has patch:  1 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  1
Easy pickings:  0 |UI/UX:  0
--+
Changes (by Tim Graham ):

 * status:  new => closed
 * resolution:   => fixed


Comment:

 In [changeset:"2fc19b92387d4248c715edfbf38658238978abb6" 2fc19b92]:
 {{{
 #!CommitTicketReference repository=""
 revision="2fc19b92387d4248c715edfbf38658238978abb6"
 Fixed #24544 -- Fixed get_image_dimensions() on image buffers that Pillow
 fails to parse.

 Thanks Steve Kossouho for the report and original patch.
 }}}

--
Ticket URL: 
Django 
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 django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.0b32ae4729caffab7f10084cc1ccffd6%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #24544: core.files.images.get_image_dimensions broken on some valid PNG images

2015-03-28 Thread Django
#24544: core.files.images.get_image_dimensions broken on some valid PNG images
--+
 Reporter:  artscoop  |Owner:  nobody
 Type:  Cleanup/optimization  |   Status:  new
Component:  File uploads/storage  |  Version:  1.7
 Severity:  Normal|   Resolution:
 Keywords:  PIL   | Triage Stage:  Accepted
Has patch:  1 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  1
Easy pickings:  0 |UI/UX:  0
--+
Changes (by timgraham):

 * needs_better_patch:  0 => 1
 * needs_tests:  1 => 0


--
Ticket URL: 
Django 
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 django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.57331714d4c8ef90cb6338f8749e99c3%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #24544: core.files.images.get_image_dimensions broken on some valid PNG images

2015-03-27 Thread Django
#24544: core.files.images.get_image_dimensions broken on some valid PNG images
--+
 Reporter:  artscoop  |Owner:  nobody
 Type:  Cleanup/optimization  |   Status:  new
Component:  File uploads/storage  |  Version:  1.7
 Severity:  Normal|   Resolution:
 Keywords:  PIL   | Triage Stage:  Accepted
Has patch:  1 |  Needs documentation:  0
  Needs tests:  1 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+
Changes (by timgraham):

 * has_patch:  0 => 1
 * type:  Uncategorized => Cleanup/optimization
 * stage:  Unreviewed => Accepted


--
Ticket URL: 
Django 
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 django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.a1e4a80d1c2dc723a16d2b7567db4861%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #24544: core.files.images.get_image_dimensions broken on some valid PNG images

2015-03-27 Thread Django
#24544: core.files.images.get_image_dimensions broken on some valid PNG images
-+-
 Reporter:  artscoop |Owner:  nobody
 Type:  Uncategorized|   Status:  new
Component:  File |  Version:  1.7
  uploads/storage|
 Severity:  Normal   |   Resolution:
 Keywords:  PIL  | Triage Stage:
 |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  1|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by phalt):

 * needs_tests:  0 => 1


--
Ticket URL: 
Django 
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 django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.9f419644f0652208056fa87e7fd5e7fa%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #24544: core.files.images.get_image_dimensions broken on some valid PNG images

2015-03-27 Thread Django
#24544: core.files.images.get_image_dimensions broken on some valid PNG images
-+-
 Reporter:  artscoop |Owner:  nobody
 Type:  Uncategorized|   Status:  new
Component:  File |  Version:  1.7
  uploads/storage|
 Severity:  Normal   |   Resolution:
 Keywords:  PIL  | Triage Stage:
 |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by artscoop):

 Pull request made here: https://github.com/django/django/pull/4398

--
Ticket URL: 
Django 
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 django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.d954dfc2d926e92bcf2834f073376bcf%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #24544: core.files.images.get_image_dimensions broken on some valid PNG images

2015-03-27 Thread Django
#24544: core.files.images.get_image_dimensions broken on some valid PNG images
-+-
 Reporter:  artscoop |Owner:  nobody
 Type:  Uncategorized|   Status:  new
Component:  File |  Version:  1.7
  uploads/storage|
 Severity:  Normal   |   Resolution:
 Keywords:  PIL  | Triage Stage:
 |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by artscoop):

 * needs_better_patch:   => 0
 * needs_tests:   => 0
 * needs_docs:   => 0


Old description:

> Hi,
> second time I find a bug in the same function. Here, the function failed
> (exception raised and not caught) on a valid PNG file (this image:
> https://mega.co.nz/#!W0tXzBAK!iLprbqkVWFAzfcn2GUDRGHiH8Pxyi4DxCQi580shcec).
> The error raised by PIL is a `struct.error`, which should be expected but
> is not caught by the chunk feeder loop.
>
> The feeder knows this
>
> {{{
> except zlib.error as e:
> # ignore zlib complaining on truncated stream, just feed
> more
> # data to parser (ticket #19457).
> if e.args[0].startswith("Error -5"):
> pass
> else:
> raise
> }}}
>
> but does not know this
>
> {{{
> from struct import error
> ...
>
> except struct.error:
> pass
> }}}

New description:

 Hi,
 second time I find a bug in the same function. Here, the function failed
 (exception raised and not caught) on a valid PNG file (this image:
 https://mega.co.nz/#!W0tXzBAK!iLprbqkVWFAzfcn2GUDRGHiH8Pxyi4DxCQi580shcec).
 The error raised by PIL is a `struct.error`, which should be expected but
 is not caught by the chunk feeder loop.

 The feeder knows this

 {{{
 except zlib.error as e:
 # ignore zlib complaining on truncated stream, just feed
 more
 # data to parser (ticket #19457).
 if e.args[0].startswith("Error -5"):
 pass
 else:
 raise
 }}}

 but does not know this

 {{{
 from struct import error
 ...

 except struct.error:
 pass
 }}}

 when you catch the proper exception, the file header fed to the parser
 becomes correct starting at offset 9214.
 The good news is, it does not need tests.

--

--
Ticket URL: 
Django 
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 django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.a562dff3a8d59dfd050455cf35c13b39%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #24544: core.files.images.get_image_dimensions broken on some valid PNG images

2015-03-27 Thread Django
#24544: core.files.images.get_image_dimensions broken on some valid PNG images
--+
 Reporter:  artscoop  |  Owner:  nobody
 Type:  Uncategorized | Status:  new
Component:  File uploads/storage  |Version:  1.7
 Severity:  Normal| Resolution:
 Keywords:  PIL   |   Triage Stage:  Unreviewed
Has patch:  0 |  Easy pickings:  0
UI/UX:  0 |
--+
Changes (by artscoop):

 * Attachment "b.png" added.

 Valid but faulty image

--
Ticket URL: 
Django 
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 django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.6eb16f6fb781b0885a16a60bd7b9ec7f%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


[Django] #24544: core.files.images.get_image_dimensions broken on some valid PNG images

2015-03-27 Thread Django
#24544: core.files.images.get_image_dimensions broken on some valid PNG images
--+
 Reporter:  artscoop  |  Owner:  nobody
 Type:  Uncategorized | Status:  new
Component:  File uploads/storage  |Version:  1.7
 Severity:  Normal|   Keywords:  PIL
 Triage Stage:  Unreviewed|  Has patch:  0
Easy pickings:  0 |  UI/UX:  0
--+
 Hi,
 second time I find a bug in the same function. Here, the function failed
 (exception raised and not caught) on a valid PNG file (this image:
 https://mega.co.nz/#!W0tXzBAK!iLprbqkVWFAzfcn2GUDRGHiH8Pxyi4DxCQi580shcec).
 The error raised by PIL is a `struct.error`, which should be expected but
 is not caught by the chunk feeder loop.

 The feeder knows this

 {{{
 except zlib.error as e:
 # ignore zlib complaining on truncated stream, just feed
 more
 # data to parser (ticket #19457).
 if e.args[0].startswith("Error -5"):
 pass
 else:
 raise
 }}}

 but does not know this

 {{{
 from struct import error
 ...

 except struct.error:
 pass
 }}}

--
Ticket URL: 
Django 
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 django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/051.03052ba03116839a6f4e7c11d8fbb209%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.