summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorJoas Schilling <213943+nickvergessen@users.noreply.github.com>2019-09-09 14:59:08 +0200
committerGitHub <noreply@github.com>2019-09-09 14:59:08 +0200
commit9268c0c68b3e7331a666a07b964feede2e4496b6 (patch)
tree5fa194d428a14d8a57f59c95d371146dee1b124d /apps
parent03746e7c44c5df203fef5d025f3496e192469c29 (diff)
parent70807a74c744ae0b613f8f9441ca663e391569de (diff)
downloadnextcloud-server-9268c0c68b3e7331a666a07b964feede2e4496b6.tar.gz
nextcloud-server-9268c0c68b3e7331a666a07b964feede2e4496b6.zip
Merge pull request #16985 from nextcloud/bugfix/noid/unjailed-share-path-v2
Properly initialize the CacheJail for sharing
Diffstat (limited to 'apps')
-rw-r--r--apps/files_sharing/lib/Cache.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/files_sharing/lib/Cache.php b/apps/files_sharing/lib/Cache.php
index bb1467ea827..e50e1661447 100644
--- a/apps/files_sharing/lib/Cache.php
+++ b/apps/files_sharing/lib/Cache.php
@@ -67,12 +67,12 @@ class Cache extends CacheJail {
parent::__construct(
null,
- null
+ ''
);
}
protected function getRoot() {
- if (is_null($this->root)) {
+ if ($this->root === '') {
$absoluteRoot = $this->sourceRootInfo->getPath();
// the sourceRootInfo path is the absolute path of the folder in the "real" storage
@@ -138,7 +138,7 @@ class Cache extends CacheJail {
protected function formatCacheEntry($entry, $path = null) {
if (is_null($path)) {
- $path = isset($entry['path']) ? $entry['path'] : '';
+ $path = $entry['path'] ?? '';
$entry['path'] = $this->getJailedPath($path);
} else {
$entry['path'] = $path;