Skip to content

Commit

Permalink
Merge pull request owncloud#14433 from owncloud/fix-public-php
Browse files Browse the repository at this point in the history
Use `getParam` instead of `server`
  • Loading branch information
DeepDiver1975 committed Feb 23, 2015
2 parents e87ada8 + 615bc5a commit 0cdc2ce
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions public.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,12 @@
OC::checkSingleUserMode();
$request = \OC::$server->getRequest();
$pathInfo = $request->getPathInfo();
if (!$pathInfo && !isset($request->server['service'])) {

if (!$pathInfo && $request->getParam('service', '') === '') {
header('HTTP/1.0 404 Not Found');
exit;
} elseif (isset($request->server['service'])) {
$service = $request->server['service'];
} elseif ($request->getParam('service', '')) {
$service = $request->getParam('service', '');
} else {
$pathInfo = trim($pathInfo, '/');
list($service) = explode('/', $pathInfo);
Expand Down

0 comments on commit 0cdc2ce

Please sign in to comment.