[svg-edit] r2883 committed - Fix case issue impacting server save of SVG files (usually not used by...

1 view
Skip to first unread message

svg-...@googlecode.com

unread,
Jun 13, 2014, 4:16:59 AM6/13/14
to svg-edi...@googlegroups.com
Revision: 2883
Author: brettz9
Date: Fri Jun 13 08:16:47 2014 UTC
Log: Fix case issue impacting server save of SVG files (usually not
used by modern browsers given the checks)
http://code.google.com/p/svg-edit/source/detail?r=2883

Modified:
/trunk/editor/extensions/allowedMimeTypes.php
/trunk/editor/extensions/filesave.php

=======================================
--- /trunk/editor/extensions/allowedMimeTypes.php Sun Feb 2 01:06:25 2014
UTC
+++ /trunk/editor/extensions/allowedMimeTypes.php Fri Jun 13 08:16:47 2014
UTC
@@ -1,7 +1,7 @@
<?php

$allowedMimeTypesBySuffix = array(
- 'svg' => 'image/svg+xml;charset=utf-8',
+ 'svg' => 'image/svg+xml;charset=UTF-8',
'png' => 'image/png',
'jpeg' => 'image/jpeg',
'bmp' => 'image/bmp',
=======================================
--- /trunk/editor/extensions/filesave.php Sun Feb 2 01:06:25 2014 UTC
+++ /trunk/editor/extensions/filesave.php Fri Jun 13 08:16:47 2014 UTC
@@ -20,8 +20,8 @@

require('allowedMimeTypes.php');

-$mime = !isset($_POST['mime']) || !in_array($_POST['mime'],
$allowedMimeTypesBySuffix) ? 'image/svg+xml;charset=UTF-8' : $_POST['mime'];
-
+$mime = (!isset($_POST['mime']) || !in_array($_POST['mime'],
$allowedMimeTypesBySuffix)) ? 'image/svg+xml;charset=UTF-8' :
$_POST['mime'];
+
if (!isset($_POST['output_svg']) && !isset($_POST['output_img'])) {
die('post fail');
}
Reply all
Reply to author
Forward
0 new messages