Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBart Visscher <bartv@thisnet.nl>2012-06-27 00:24:16 +0400
committerBart Visscher <bartv@thisnet.nl>2012-06-27 03:05:12 +0400
commit153ee9dcfa62fa7efaf365890884c516d8bc11a1 (patch)
tree5c806622520ab2614edb31e8b63e93d52c692510 /remote.php
parentdab58f3464ec8aded5e0da4b050e5ee3d0bc5cfc (diff)
Check if app is enabled before loading in remote and public.php
Diffstat (limited to 'remote.php')
-rw-r--r--remote.php15
1 files changed, 13 insertions, 2 deletions
diff --git a/remote.php b/remote.php
index e68a53800c7..af48cd922c8 100644
--- a/remote.php
+++ b/remote.php
@@ -27,13 +27,24 @@ $file = ltrim ($file, '/');
if(count(explode('/',$file)) == 2) {
$parts=explode('/',$file);
- $app=$parts[1];
- OC_App::loadApp($app);
+ $app=$parts[0];
+ switch ($app) {
+ case 'files':
+ OC_Util::checkAppEnabled($app);
+ OC_App::loadApp($app);
+ break;
+ case 'core':
+ break;
+ default:
+ OC_Response::setStatus(OC_Response::STATUS_NOT_FOUND);
+ exit;
+ }
$baseuri = OC::$WEBROOT . '/remote.php/'.$service.'/';
require_once( OC::$SERVERROOT.'/'.$file);
} else {
$parts=explode('/', $file, 2);
$app=$parts[0];
+ OC_Util::checkAppEnabled($app);
OC_App::loadApp($app);
$baseuri = OC::$WEBROOT . '/remote.php/'.$service.'/';
require_once(OC_App::getAppPath($app) .'/'. $parts[1]);