diff options
author | Brice Maron <brice@bmaron.net> | 2012-06-21 19:19:39 +0000 |
---|---|---|
committer | Brice Maron <brice@bmaron.net> | 2012-06-21 19:19:39 +0000 |
commit | d22f805b632fad18232d49d638949fe87c2f9183 (patch) | |
tree | 1a66f819f34883bc1cad8944d251f43fe1e00f15 /remote.php | |
parent | e5c56b2433b1987e4b6b8020e01f4da03623c4b8 (diff) | |
download | nextcloud-server-d22f805b632fad18232d49d638949fe87c2f9183.tar.gz nextcloud-server-d22f805b632fad18232d49d638949fe87c2f9183.zip |
Correct inclusion paths
Diffstat (limited to 'remote.php')
-rw-r--r-- | remote.php | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/remote.php b/remote.php index a58b1c0a0fc..ef610f36947 100644 --- a/remote.php +++ b/remote.php @@ -20,7 +20,6 @@ if(is_null($file)){ OC_Response::setStatus(OC_Response::STATUS_NOT_FOUND); exit; } - if(count(explode('/',$file)) == 3) { $parts=explode('/',$file); $app=$parts[2]; @@ -28,9 +27,9 @@ if(count(explode('/',$file)) == 3) { $baseuri = OC::$WEBROOT . '/remote.php/'.$service.'/'; require_once( OC::$SERVERROOT.$file); } else { - $parts=explode('/', $file, 2); - $app=$parts[0]; + $parts=explode('/', $file, 4); + $app=$parts[2]; OC_App::loadApp($app); $baseuri = OC::$WEBROOT . '/remote.php/'.$service.'/'; - require_once(OC_App::getAppPath($app) .'/'. $parts[1]); + require_once(OC_App::getAppPath($app) .'/'. $parts[3]); } |