Merge pull request #9210 from owncloud/better_validation_in_getAppPath

better validation for OC_App::getAppPath()
This commit is contained in:
Vincent Petry 2014-06-26 15:52:12 +02:00
commit b7d79a90b0

View file

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