diff options
Diffstat (limited to 'remote.php')
-rw-r--r-- | remote.php | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/remote.php b/remote.php index 63a45321eb0..0c5804221bb 100644 --- a/remote.php +++ b/remote.php @@ -7,13 +7,17 @@ if (array_key_exists('PATH_INFO', $_SERVER)){ }else{ $path_info = substr($_SERVER['REQUEST_URI'], strlen($_SERVER['SCRIPT_NAME'])); } +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 = OCP\CONFIG::getAppValue('core', 'remote_' . $service); +$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; } |