Merge pull request #9210 from owncloud/better_validation_in_getAppPath
better validation for OC_App::getAppPath()
This commit is contained in:
commit
b7d79a90b0
1 changed files with 4 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue