Page MenuHomePhabricator

Use ImageMagick for XCF rendering instead of xcftools
Closed, ResolvedPublic

Description

Thumbor depends on the xcf2png utility from https://github.com/j-jorge/xcftools to convert XCF files to PNG files during thumbnailing. That library is largely unmaintained. It is based on a version of the spec from 2006, and received limited updates when it was forked in 2013 to make it compatible with GIMP 2.8. Updates since then have been maintenance only. The project also has two active unfixed vulnerabilities, CVE-2019-5086 (CVSS 7.5) and CVE-2019-5087 (CVSS 8.8).

ImageMagick is already used by thumbor, so dropping xcftools won't add a new dependency. ImageMagick's XCF support is also lacking, but it does at least partially support GIMP 2.10 files in ImageMagick 7.

Related Objects

StatusSubtypeAssignedTask
OpenNone
OpenNone
StalledNone
StalledNone
StalledNone
StalledNone
StalledNone
OpenFeatureNone
StalledBUG REPORTNone
StalledBUG REPORTNone
StalledNone
DuplicateBUG REPORTNone
OpenNone
StalledBUG REPORTNone
OpenNone
OpenNone
OpenNone
OpenNone
OpenNone
ResolvedAntiCompositeNumber

Event Timeline

Debian is only packagaing ImageMagick 6 right now, which has only GIMP 2.8 support. The two should still be roughly equivalent.

Change 619864 had a related patch set uploaded (by AntiCompositeNumber; owner: AntiCompositeNumber):
[operations/software/thumbor-plugins@master] engine: Remove custom XCF handler in favor of ImageMagick

https://gerrit.wikimedia.org/r/619864

Change 921053 had a related patch set uploaded (by Hnowlan; author: Hnowlan):

[operations/deployment-charts@master] thumbor: move xcf support to imagemagick

https://gerrit.wikimedia.org/r/921053

The above patch seems ready to go imo, tests pass.

I am happy to merge and deploy this next week if you're okay with it @AntiCompositeNumber

I have no objections, though I have not tested this patch since I submitted it. I will note that there is only one XCF test case in the Thumbor integration tests. However, because of the limitations of both the xcftools and imagemagick implementations, I'd say our support for the format is already minimal, so any changes are low-risk.

My preferred solution remains T260286: Deprecate xcf files but it seems unlikely to gain consensus. This should do fine for now.

Change 619864 merged by jenkins-bot:

[operations/software/thumbor-plugins@master] engine: Remove custom XCF handler in favor of ImageMagick

https://gerrit.wikimedia.org/r/619864

Change 921053 merged by jenkins-bot:

[operations/deployment-charts@master] thumbor: move xcf support to imagemagick

https://gerrit.wikimedia.org/r/921053