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:
authorLukas Reschke <lukas@owncloud.com>2015-02-23 16:07:42 +0300
committerLukas Reschke <lukas@owncloud.com>2015-02-23 16:07:42 +0300
commit615bc5a827f8d397ce75e3efb3341cee2f542e02 (patch)
tree2f789e8b8034a69ae06fe7cd0aa9c2ed318666ca /public.php
parentf693d439e24c1d59c0de2347d6c9888c852cfafe (diff)
Use `getParam` instead of `server`
`server` is completely wrong here and this will not work on master. With `getParam` it will work fine though. Testplan: - [ ] Without patch: Share a file and try to access `http://localhost/public.php?service=files&t=THESHAREDTOKEN` => Fails - [ ] With patch: Try the same => Works Master only.
Diffstat (limited to 'public.php')
-rw-r--r--public.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/public.php b/public.php
index f17052a6c87..76fe5ac0570 100644
--- a/public.php
+++ b/public.php
@@ -15,11 +15,12 @@ try {
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);