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
1 changed files with 4 additions and 0 deletions

View 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;
}