]> source.dussan.org Git - nextcloud-server.git/commitdiff
better validation for OC_App::getAppPath()
authorGeorg Ehrke <developer@georgehrke.com>
Wed, 25 Jun 2014 14:24:55 +0000 (16:24 +0200)
committerGeorg Ehrke <developer@georgehrke.com>
Wed, 25 Jun 2014 14:24:55 +0000 (16:24 +0200)
lib/private/app.php

index 01597b37e77458acb6eb74d04f5e41476b2b392e..9fb0ec2e34f479250959af4900a7f8a5cebdc0eb 100644 (file)
@@ -509,6 +509,10 @@ class OC_App {
         * @return string|false
         */
        public static function getAppPath($appid) {
+               if ($appid === null || trim($appid) === '') {
+                       return false;
+               }
+
                if (($dir = self::findAppInDirectories($appid)) != false) {
                        return $dir['path'] . '/' . $appid;
                }