]> git.mxchange.org Git - friendica.git/blobdiff - src/Core/Hook.php
Sanitize addon path items
[friendica.git] / src / Core / Hook.php
index 7f0c015b3db155ae500b3ded2d06ecf0837c20d7..5caa54319429df3ff4a81668a7517ca59c02549b 100644 (file)
@@ -7,6 +7,7 @@ namespace Friendica\Core;
 use Friendica\App;
 use Friendica\BaseObject;
 use Friendica\Database\DBA;
+use Friendica\Util\Strings;
 
 /**
  * Some functions to handle hooks
@@ -215,6 +216,8 @@ class Hook extends BaseObject
         */
        public static function isAddonApp($name)
        {
+               $name = Strings::sanitizeFilePathItem($name);
+
                if (array_key_exists('app_menu', self::$hooks)) {
                        foreach (self::$hooks['app_menu'] as $hook) {
                                if ($hook[0] == 'addon/' . $name . '/' . $name . '.php') {