Merge pull request #46849 from nextcloud/fix-recursive-share-check

fix: fix recursive share check
This commit is contained in:
Git'Fellow 2024-07-30 08:59:58 +02:00 committed by GitHub
commit 6680dd4182
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -151,10 +151,10 @@ class SharedStorage extends \OC\Files\Storage\Wrapper\Jail implements ISharedSto
$this->cache = new FailedCache();
$this->rootPath = '';
} else {
$this->nonMaskedStorage = $ownerNode->getStorage();
if ($this->nonMaskedStorage instanceof Wrapper && $this->nonMaskedStorage->isWrapperOf($this)) {
throw new \Exception('recursive share detected');
}
$this->nonMaskedStorage = $ownerNode->getStorage();
$this->sourcePath = $ownerNode->getPath();
$this->rootPath = $ownerNode->getInternalPath();
$this->storage = new PermissionsMask([