summaryrefslogtreecommitdiffstats
path: root/lib/private/app.php
diff options
context:
space:
mode:
authorGeorg Ehrke <developer@georgehrke.com>2014-06-25 16:24:55 +0200
committerGeorg Ehrke <developer@georgehrke.com>2014-06-25 16:24:55 +0200
commit09356bc5b36bc68cad54517aabe858fd42ba23a2 (patch)
tree1230a89fa111f5fbb25e5c926b4cf2aae6e356e0 /lib/private/app.php
parent16396e2e3314a3dcd0fde2396212e3986e6e8ad2 (diff)
downloadnextcloud-server-09356bc5b36bc68cad54517aabe858fd42ba23a2.tar.gz
nextcloud-server-09356bc5b36bc68cad54517aabe858fd42ba23a2.zip
better validation for OC_App::getAppPath()
Diffstat (limited to 'lib/private/app.php')
-rw-r--r--lib/private/app.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/private/app.php b/lib/private/app.php
index 01597b37e77..9fb0ec2e34f 100644
--- a/lib/private/app.php
+++ b/lib/private/app.php
@@ -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;
}