suggestion: improved error message compared to "not authorized"
Posted: 2018-10-06T08:55:57-07:00
I just spent a very long time tracking down the source of the error message in my web application:
convert: not authorized `upload.pdf' @ error/constitute.c/ReadImage/412.
This is because I assumed "not authorized" meant something to do with file permissions, directory permissions, apache's systemd private /tmp, etc.
This assumption is, I think, entirely reasonable... but it turns out to be wrong: it's a policy.xml issue (because ImageMagic has now upgraded to a version that doesn't do PDFs by default).
Please could you make this error message a bit more explicit, so that users who see it are pointed in the right direction? I propose:
"convert: format not authorized by policy.xml `upload.pdf' @ error/constitute.c/ReadImage/412."
This way, I'd get the hint that this is something unexpected that is to do with imagemagick's configuration.
Another thing that is confusing is that the full error message reads:
convert: not authorized `upload.pdf' @ error/constitute.c/ReadImage/412.
convert: no images defined `output.jpg' @ error/convert.c/ConvertImageCommand/3258.
I think after the first error, convert should quit: the 2nd errormessage is actually a bit misleading.
Thanks.
convert: not authorized `upload.pdf' @ error/constitute.c/ReadImage/412.
This is because I assumed "not authorized" meant something to do with file permissions, directory permissions, apache's systemd private /tmp, etc.
This assumption is, I think, entirely reasonable... but it turns out to be wrong: it's a policy.xml issue (because ImageMagic has now upgraded to a version that doesn't do PDFs by default).
Please could you make this error message a bit more explicit, so that users who see it are pointed in the right direction? I propose:
"convert: format not authorized by policy.xml `upload.pdf' @ error/constitute.c/ReadImage/412."
This way, I'd get the hint that this is something unexpected that is to do with imagemagick's configuration.
Another thing that is confusing is that the full error message reads:
convert: not authorized `upload.pdf' @ error/constitute.c/ReadImage/412.
convert: no images defined `output.jpg' @ error/convert.c/ConvertImageCommand/3258.
I think after the first error, convert should quit: the 2nd errormessage is actually a bit misleading.
Thanks.