Merge branch '3.0'
authorAlexander Ebert <ebert@woltlab.com>
Thu, 14 Feb 2019 18:53:59 +0000 (19:53 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Thu, 14 Feb 2019 18:53:59 +0000 (19:53 +0100)
1  2 
wcfsetup/install/files/lib/util/ImageUtil.class.php

index 8dfbc0e0169cb094e8a4d9ea34e3d310a58bff5e,8a67d9bb04c0023a415cbac05dabdf66cdf75bf5..9b72eaf5d31d9be510db6d0d3eb6b1c0f4c6f437
@@@ -5,7 -5,7 +5,7 @@@ namespace wcf\util
   * Contains image-related functions.
   * 
   * @author    Marcel Werk
 - * @copyright 2001-2017 WoltLab GmbH
 + * @copyright 2001-2018 WoltLab GmbH
   * @license   GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
   * @package   WoltLabSuite\Core\Util
   */
@@@ -32,7 -32,7 +32,7 @@@ final class ImageUtil 
                $content = str_replace('description', '', $content);
                
                // search for javascript
 -              if (strstr($content, 'script') || strstr($content, 'javascript') || strstr($content, 'expression(')) return false;
 +              if (strpos($content, 'script') !== false || strpos($content, 'javascript') !== false || strpos($content, 'expression(') !== false) return false;
                
                return true;
        }
@@@ -58,7 -58,7 +58,7 @@@
                        }
                }
                else if ($handleSvgAsValidImage) {
-                       if (!in_array(FileUtil::getMimeType($location), ['image/svg', 'image/svg+xml']) && pathinfo($filename, PATHINFO_EXTENSION) === 'svg') {
+                       if (in_array(FileUtil::getMimeType($location), ['image/svg', 'image/svg+xml']) && pathinfo($filename, PATHINFO_EXTENSION) === 'svg') {
                                return true;
                        }
                }