From fbabe24f642665f9dd975eb8b8cd87830a4f9a99 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Mon, 29 Jul 2024 15:21:18 +0200 Subject: [PATCH] fix: fix recursive share check Signed-off-by: Robin Appelman --- apps/files_sharing/lib/SharedStorage.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/files_sharing/lib/SharedStorage.php b/apps/files_sharing/lib/SharedStorage.php index e7277323d8197..413a4460ad3e8 100644 --- a/apps/files_sharing/lib/SharedStorage.php +++ b/apps/files_sharing/lib/SharedStorage.php @@ -178,10 +178,10 @@ private function init() { $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([