-
Notifications
You must be signed in to change notification settings - Fork 70
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
Is it possible to change ImageMagick policy? #155
Comments
Is this still an issue on Ubuntu 20.04 LTS? I spun up an Ubuntu 20.04 LTS instance and it seems it is:
After installing
I personally wouldn't like to deal with this problem if possible. I don't have deep enough knowledge about PDF generation to be responsible to maintain this change on Read the Docs. However, if we know there is a fix/workaround the user can do by themselves, I'd like to have it documented. |
Yes, The suggested fix would be to use But for me personally, that's not really important, I prefer the
Yes, installing
Yes, installing The
No problem, it's not that important, but merging #154 would be great! |
Hi @mgeier , thanks for the detailed answer. About your last point:
Since now users can install their own packages specifying |
(From your comment on #154 (comment)) It can be argued though that most of the RTD users will probably not need this, otherwise (supposedly) we would be getting requests about this quite often, which is not the case. |
Thanks a lot @mgeier for the detailed explanation! 🚀 Also, thanks @astrojuanlu for chiming in. I agree with what you've said. I don't think we should install by default |
Let's try combining advice from: ImageMagick/ImageMagick#2033 (comment) readthedocs/readthedocs-docker-images#155 (comment)
When trying to convert a PDF file to PNG, I get the following error:
This seems to be due to a security problem that has been fixed in the meantime but a safety mechanism has not been reverted (AFAIU, but I don't really understand the details).
The suggested fix is to change the file
/etc/ImageMagick-6/policy.xml
from having the lineto the line
Here are some links that I have found:
https://www.scivision.dev/imagemagick-convert-not-authorized/
https://stackoverflow.com/questions/53377176/change-imagemagick-policy-on-a-dockerfile
https://stackoverflow.com/questions/52861946/imagemagick-not-authorized-to-convert-pdf-to-an-image
https://askubuntu.com/questions/1081895/trouble-with-batch-conversion-of-png-to-pdf-using-convert
https://stackoverflow.com/questions/42928765/convertnot-authorized-aaaa-error-constitute-c-readimage-453
Is it possible to fix this in the docker image?
An alternative to fixing this would be to install
poppler-utils
instead: #154.Ideally both things could be done.
The text was updated successfully, but these errors were encountered: