mirror of
https://github.com/nextcloud/server.git
synced 2026-04-24 23:59:27 -04:00
better validation for OC_App::getAppPath()
This commit is contained in:
parent
16396e2e33
commit
09356bc5b3
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