https://bugzilla.wikimedia.org/show_bug.cgi?id=59744

       Web browser: ---
            Bug ID: 59744
           Summary: Consider safely opitimizing embedded SVG icons in
                    MediaWiki core
           Product: MediaWiki
           Version: 1.23-git
          Hardware: All
                OS: All
            Status: NEW
          Severity: major
          Priority: Unprioritized
         Component: General/Unknown
          Assignee: wikibugs-l@lists.wikimedia.org
          Reporter: b...@mzmcbride.com
                CC: pleasest...@live.com
    Classification: Unclassified
   Mobile Platform: ---

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 <tecn...@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.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to