Getting convert: not authorized when converting MSVG: file

Questions and postings pertaining to the development of ImageMagick, feature enhancements, and ImageMagick internals. ImageMagick source code and algorithms are discussed here. Usage questions which are too arcane for the normal user list should also be posted here.
Post Reply
wsb2522
Posts: 2
Joined: 2016-07-06T09:56:41-07:00
Authentication code: 1151

Getting convert: not authorized when converting MSVG: file

Post by wsb2522 »

convert MSVG:in.svg out.png

Yields:
convert: not authorized `/tmp/magick-z4igycWL' @ error/constitute.c/ReadImage/45 3.
convert: missing an image filename `out.png' @ error/convert.c/ConvertImageComma

Any ideas?

If we remove the MSVG: coder, then it completes without error, but the output is not correct. This has worked for a couple of years up until an ImageMagic patch got applied back in the May 2016 timeframe.

convert -version
Version: ImageMagick 6.7.2-7 2016-05-09 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2011 ImageMagick Studio LLC
Features: OpenMP
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Getting convert: not authorized when converting MSVG: file

Post by snibgo »

See your policy.xml file.

You can remove the line that gives access "NONE" to SVG files, but be aware that this has security implications.
snibgo's IM pages: im.snibgo.com
wsb2522
Posts: 2
Joined: 2016-07-06T09:56:41-07:00
Authentication code: 1151

Re: Getting convert: not authorized when converting MSVG: file

Post by wsb2522 »

our Policy.xml file does not have an entry for SVG.

Code: Select all

<policymap>
  <!-- <policy domain="system" name="precision" value="6"/> -->
  <!-- <policy domain="resource" name="temporary-path" value="/tmp"/> -->
  <!-- <policy domain="resource" name="memory" value="2GiB"/> -->
  <!-- <policy domain="resource" name="map" value="4GiB"/> -->
  <!-- <policy domain="resource" name="area" value="1gb"/> -->
  <!-- <policy domain="resource" name="disk" value="16eb"/> -->
  <!-- <policy domain="resource" name="file" value="768"/> -->
  <!-- <policy domain="resource" name="thread" value="4"/> -->
  <!-- <policy domain="resource" name="throttle" value="0"/> -->
  <!-- <policy domain="resource" name="time" value="3600"/> -->
  <policy domain="coder" rights="none" pattern="EPHEMERAL" />
  <policy domain="coder" rights="none" pattern="HTTPS" />
  <policy domain="coder" rights="none" pattern="HTTP" />
  <policy domain="coder" rights="none" pattern="URL" />
  <policy domain="coder" rights="none" pattern="FTP" />
  <policy domain="coder" rights="read | write" pattern="MSVG" />
  <policy domain="coder" rights="none" pattern="MVG" />
  <policy domain="coder" rights="none" pattern="MSL" />
  <policy domain="coder" rights="none" pattern="TEXT" />
  <policy domain="coder" rights="none" pattern="LABEL" />
  <policy domain="path" rights="none" pattern="@*" />
</policymap>
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Getting convert: not authorized when converting MSVG: file

Post by snibgo »

Try removing the line:

Code: Select all

<policy domain="coder" rights="none" pattern="MVG" />
snibgo's IM pages: im.snibgo.com
Post Reply