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:
authorBrice Maron <brice@bmaron.net>2012-06-15 01:16:59 +0400
committerBrice Maron <brice@bmaron.net>2012-06-15 01:16:59 +0400
commit4753cc3ebde9867ab4deb1979fb4231b0c847426 (patch)
treec6944e947bc84c8716b57b7e2b06ef51efccb3db /remote.php
parent6da5a2fdd4e8a19ab993b4a1f7de7e45b8922a16 (diff)
parentf3b30e4658c4dde82b56b458c672fa5edcba5d6b (diff)
Merge branch 'master' into multi_app_dir
Conflicts: apps/bookmarks/ajax/addBookmark.php config/config.sample.php lib/app.php remote.php
Diffstat (limited to 'remote.php')
-rw-r--r--remote.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/remote.php b/remote.php
index e1e11c5773f..9fb73c4ce1d 100644
--- a/remote.php
+++ b/remote.php
@@ -7,13 +7,17 @@ if (array_key_exists('PATH_INFO', $_SERVER)){
}else{
$path_info = substr($_SERVER['PHP_SELF'], strpos($_SERVER['PHP_SELF'], basename(__FILE__)) + strlen(basename(__FILE__)));
}
+if ($path_info === false) {
+ OC_Response::setStatus(OC_Response::STATUS_NOT_FOUND);
+ exit;
+}
if (!$pos = strpos($path_info, '/', 1)) {
$pos = strlen($path_info);
}
$service=substr($path_info, 1, $pos-1);
$file = OC_AppConfig::getValue('core', 'remote_' . $service);
if(is_null($file)){
- header('HTTP/1.0 404 Not Found');
+ OC_Response::setStatus(OC_Response::STATUS_NOT_FOUND);
exit;
}
@@ -23,7 +27,6 @@ if(count(explode('/',$file)) == 3) {
OC_App::loadApp($app);
$baseuri = OC::$WEBROOT . '/remote.php/'.$service.'/';
require_once( OC::$SERVERROOT.$file);
-
} else {
$parts=explode('/', $file, 2);
$app=$parts[0];