fix: fix recursive share check

Signed-off-by: Robin Appelman <robin@icewind.nl>
pull/46849/head
Robin Appelman 2024-07-29 15:21:18 +07:00 committed by Git'Fellow
parent 24a0d3e101
commit 23cdb539ce
1 changed files with 1 additions and 1 deletions

@ -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([