Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

identify "d:" hangs #275

Closed
qwerty4030 opened this issue Sep 23, 2016 · 5 comments
Closed

identify "d:" hangs #275

qwerty4030 opened this issue Sep 23, 2016 · 5 comments

Comments

@qwerty4030
Copy link

qwerty4030 commented Sep 23, 2016

Version: ImageMagick 6.9.3-10 Q16 x86_64 2016-05-04 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2016 ImageMagick Studio LLC
License: http://www.imagemagick.org/script/license.php
Features: Cipher DPC OpenMP
Delegates (built-in): jng jpeg lzma png tiff xml zlib

OS: 4.4.10-22.54.amzn1.x86_64 (amazon linux)

identify hangs on the following commands:

identify "d:" (no output, just hangs forever)
identify "d::" (no output, just hangs forever)
identify "http:"
error : Unknown IO error (hangs after this message)
identify "http::"
error : Unknown IO error (hangs after this message)
@glennrp
Copy link
Contributor

glennrp commented Sep 24, 2016

I haven't finished bisecting this bug yet, but I observed that the bug exists at least from 6.9.1-10 through 6.9.4-1 but not in 6.9.4-7 and later nor in 7.0.1-1 and later (testing on Ubuntu 16:04). I don't see anything about it in the ChangeLog.

@mikayla-grace
Copy link

ImageMagick previously defaulted to stdin if no filename was specified. With recent versions of ImageMagick, you can replicate the behavior with a dash, e.g. identify -. To prevent reading from stdin, add this policy (see http://www.imagemagick.org/script/security-policy.php):

<policy domain="path" rights="none" pattern="-"/>

With this policy, we get

$ identify -
identify: not authorized `-' @ error/blob.c/OpenBlob/2451.
identify: no decode delegate for this image format `' @ error/constitute.c/ReadImage/508.

@qwerty4030
Copy link
Author

qwerty4030 commented Nov 14, 2016

Still getting this behavior on an upgraded version:

Version: ImageMagick 6.9.5-10 Q16 x86_64 2016-11-11 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2016 ImageMagick Studio LLC
License: http://www.imagemagick.org/script/license.php
Features: Cipher DPC OpenMP 
Delegates (built-in): zlib

The following command hangs:

identify "http:"

I noticed that some delegates are missing, working on installing those now. However I do not expect that command to hang.

@dlemstra
Copy link
Member

Can you still reproduce this issue @qwerty4030 or can we close it?

@qwerty4030
Copy link
Author

@dlemstra If I remember correctly, installing the missing delegates resolved the issue. We are now only passing valid filenames (from the tmp directory) to IM and we have not run into this issue since then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

4 participants