Merge pull request #16985 from nextcloud/bugfix/noid/unjailed-share-path-v2

Properly initialize the CacheJail for sharing
pull/17066/head
Joas Schilling 6 years ago committed by GitHub
commit 9268c0c68b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      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;

Loading…
Cancel
Save