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

icat kitten does not work with HTTPS image URIs #1340

Closed
lamby opened this issue Jan 27, 2019 · 4 comments
Closed

icat kitten does not work with HTTPS image URIs #1340

lamby opened this issue Jan 27, 2019 · 4 comments

Comments

@lamby
Copy link
Contributor

lamby commented Jan 27, 2019

This appears to be due to ImageMagick's Security Policy:

$ icat https://sw.kovidgoyal.net/kitty/_static/kitty.png
Failed to open image: https://sw.kovidgoyal.net/kitty/_static/kitty.png with error: identify-im6.q16: attempt to perform an operation not allowed by the security policy `HTTPS' @ error/delegate.c/InvokeDelegate/1726.
identify-im6.q16: unable to open file `': No such file or directory @ error/constitute.c/ReadImage/600.

If it helps, the underlying call is: identify -format '%m %w %h %A' https://sw.kovidgoyal.net/kitty/_static/kitty.png. Hopefully we can set a policy when calling-out to identify.

Note that HTTP (ie. not-SSL) images Just Work.

@kovidgoyal
Copy link
Owner

You could just do

curl https://whatever | icat

@kovidgoyal
Copy link
Owner

It will be much more efficient since the image will not be fetched twice.

@lamby
Copy link
Contributor Author

lamby commented Jan 27, 2019

Oh sure, lots of solutions… but it's strange to half-support HTTP (!) but not HTTPS. :)

@kovidgoyal
Copy link
Owner

well icat does not technically support any network protocols, that is an accident of imagemagick. The proper fix for this would be to identify http(s) URLs and either download them ourselves before processing, or filter them out.

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

No branches or pull requests

2 participants