Page MenuHomePhabricator

SVG validation fails for files with embedded raster images over ~200KB
Closed, ResolvedPublic

Description

Dimensions report as 0x0, thumbnails fail to load, and get this under the image icon:

Embed_test.svg ‎(Invalid SVG file: Expected <svg> tag, got in NS )

php 7.1, php 7.2, php 7.3. Issue was not previously present before I updated the servers relatively recently.

current libxml versions: 2.9.8-6, 2.9.4+dfsg1-6.1ubuntu1.2

Setting $wgSVGMetadataCutoff to a frankly unreasonable number (4000000000) does seem to resolve the issue.

Example files:

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Change 483640 had a related patch set uploaded (by Brian Wolff; owner: Brian Wolff):
[mediawiki/core@master] Fix SVG metadata handler by changing offset from -1 to 0

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

Change 483640 merged by jenkins-bot:
[mediawiki/core@master] Fix SVG metadata handler by changing offset from -1 to 0

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

TheDJ claimed this task.
TheDJ subscribed.

This was resolved all the way back in 2019