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

Backticks in XML Comment breaks policy in /etc/ImageMagick-6/policy.xml #670

Open
renepupil opened this issue Apr 23, 2024 · 1 comment
Open

Comments

@renepupil
Copy link

We overwrite /etc/ImageMagick-6/policy.xml when building the docker image, and a newest change in our policy was to allow the .jpg extension using the coder domain:

<policymap>
    ...
    <!-- Allow `.jpg` explicit, other then the `module` domain, the `coder` does NOT assigns rights to all formats of given patterns, see https://github.com/ImageMagick/ImageMagick/issues/6061 -->
    <policy domain="coder" rights="read|write" pattern="{JPEG,PNG,JPG}" />
</policymap>

To explain the reasoning, I added the comment, above the policy, but this seems to break the policy, as it works when I remove the comment.

I suspect a parsing error, as I use some special characters, like "`", and the URL slashes "/"...

\Imagick::getVersion():

array(2) {
  ["versionNumber"]=>
  int(1691)
  ["versionString"]=>
  string(67) "ImageMagick 6.9.11-60 Q16 x86_64 2021-01-25 https://imagemagick.org"
}
@renepupil
Copy link
Author

Definitely the backticks are the culprit, this works:

<policymap>
  <!-- Allow ".jpg" explicit, other then the "module" domain, the "coder" does NOT assigns rights to all formats of given patterns, see https://github.com/ImageMagick/ImageMagick/issues/6061 -->
  <policy domain="coder" rights="read|write" pattern="{JPEG,PNG,JPG}" />
</policymap>

@renepupil renepupil changed the title XML Comment in /etc/ImageMagick-6/policy.xml breaks policy Backticks in XML Comment breaks policy in /etc/ImageMagick-6/policy.xml Apr 23, 2024
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

1 participant