Merge pull request #46862 from nextcloud/backport/46849/stable28

[stable28] fix: fix recursive share check
This commit is contained in:
Git'Fellow 2024-07-30 10:00:17 +02:00 committed by GitHub
commit 2a6e868de6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -178,10 +178,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([