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

--- Comment #1 from Thomas Bleher <thomasble...@gmx.de> 2010-12-19 16:38:27 UTC 
---
I tracked the problem down a bit, and it seems to be a problem in
includes/MimeMagic.php.

MimeMagic has a list of predefined mime types, with assorted file extensions.
The code that parses the types treats everything up to the first space as the
mime type, everything behind that as a file extension. As you can see from the
diff below, the svg line does not follow this convention, leading to an
extension of "image/svg".
This blows up in UploadStash.

With the change below, I can upload svg files again. But I'm not sure what the
correct fix is here, as this particular line is in the code since r21411, from
April 2007.

--- a/includes/MimeMagic.php
+++ b/includes/MimeMagic.php
@@ -41,7 +41,7 @@ image/x-bmp bmp
 image/gif gif
 image/jpeg jpeg jpg jpe
 image/png png
-image/svg+xml image/svg svg
+image/svg+xml svg
 image/tiff tiff tif
 image/vnd.djvu image/x.djvu image/x-djvu djvu
 image/x-portable-pixmap ppm

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- 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