aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorBart Visscher <bartv@thisnet.nl>2013-06-28 19:22:51 +0200
committerBart Visscher <bartv@thisnet.nl>2013-06-28 20:34:28 +0200
commit57370353ad1b21156094adc3d1e735582bbd2bb0 (patch)
tree839e41693a72a4fec8720bc30237f43043f7e129 /lib
parent6127fee5aa012e58c124b00f159afd3d3d95d8ce (diff)
downloadnextcloud-server-57370353ad1b21156094adc3d1e735582bbd2bb0.tar.gz
nextcloud-server-57370353ad1b21156094adc3d1e735582bbd2bb0.zip
Check if the app is enabled and the app path is found before trying to load the script file
Diffstat (limited to 'lib')
-rw-r--r--lib/base.php13
1 files changed, 8 insertions, 5 deletions
diff --git a/lib/base.php b/lib/base.php
index fd4870974fe..af0a30ea173 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -661,12 +661,15 @@ class OC {
$app = $param['app'];
$file = $param['file'];
$app_path = OC_App::getAppPath($app);
- $file = $app_path . '/' . $file;
- unset($app, $app_path);
- if (file_exists($file)) {
- require_once $file;
- return true;
+ if (OC_App::isEnabled($app) && $app_path !== false) {
+ $file = $app_path . '/' . $file;
+ unset($app, $app_path);
+ if (file_exists($file)) {
+ require_once $file;
+ return true;
+ }
}
+ header('HTTP/1.0 404 Not Found');
return false;
}