Skip to content

Skip the test if Imagick is misconfigured#24614

Merged
juliusknorr merged 1 commit intomasterfrom
bugfix/noid/fix-imagick-tests
Dec 9, 2020
Merged

Skip the test if Imagick is misconfigured#24614
juliusknorr merged 1 commit intomasterfrom
bugfix/noid/fix-imagick-tests

Conversation

@nickvergessen
Copy link
Member

cat /etc/ImageMagick-6/policy.xml

<?xml version="1.0" encoding="UTF-8"?>
…
<policymap>
  …
  <policy domain="coder" rights="none" pattern="EPS" />
  <policy domain="coder" rights="none" pattern="PDF" />
  <policy domain="coder" rights="none" pattern="XPS" />
</policymap>

EPS files are excluded by the new default imagick policy. So our test that uses them throws:

attempt to perform an operation not allowed by the security policy `PS' @ error/constitute.c/IsCoderAuthorized/408

And continues with null in:

\OC::$server->getLogger()->logException($e, [
'message' => 'File: ' . $file->getPath() . ' Imagick says:',
'level' => ILogger::ERROR,
'app' => 'core',
]);
return null;

Signed-off-by: Joas Schilling <coding@schilljs.com>
@juliusknorr juliusknorr merged commit 3749b70 into master Dec 9, 2020
@juliusknorr juliusknorr deleted the bugfix/noid/fix-imagick-tests branch December 9, 2020 12:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants