We may want to consider safely optimizing embedded SVG icons.
https://gerrit.wikimedia.org/r/96372
https://gerrit.wikimedia.org/r/103894
Full background is available at bug 59234.
(Copied from bug 59234 comment 27)
This seems to have been fixed in file 5.04; however, PHP uses a bundled,
patched copy of the library that was only updated from 5.03 to 5.11 in
12cf930a403d.
Running "git tag --contains 12cf930a403d" in php-src tells me that
affected versions of PHP were 5.3.10 and older, as well as 5.4.0.
Wikimedia runs 5.3.10 in production.
Here's a snippet of the diff:
- file-5.03/magic/Magdir/sgml 2008-07-26 11:03:55.000000000 -0400
+++ file-5.04/magic/Magdir/sgml 2009-09-19 13:31:35.000000000 -0400
@@ -1,36 +1,59 @@
#------------------------------------------------------------------------------
+# $File: sgml,v 1.24 2009/09/19 17:31:35 christos Exp $
- Type: SVG Vectorial Graphics
- From: Noel Torres <tecnico@ejerciciosresueltos.com> 0 string \<?xml\ version=" >15 string >\0
->>23 search/400 \<svg SVG Scalable Vector Graphics image
+>>19 search/4096 \<svg SVG Scalable Vector Graphics image
!:mime image/svg+xml
Note that the start offset of the search for "<svg" was dropped from 23 to 19,
and the newer, shorter XML declaration was the following 22-character string:
<?xml version="1.0" ?>
So this problem could have been avoided by either adding a DOCTYPE or leaving
one more whitespace character in the right place.
Version: 1.23.0
Severity: enhancement
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=34812