Browse Source

fix: don't return null for SharedStorage::getWrapperStorage with share recursion

Signed-off-by: Robin Appelman <robin@icewind.nl>
tags/v29.0.0beta3
Robin Appelman 2 months ago
parent
commit
0ace9a4efa
No account linked to committer's email address
1 changed files with 10 additions and 0 deletions
  1. 10
    0
      apps/files_sharing/lib/SharedStorage.php

+ 10
- 0
apps/files_sharing/lib/SharedStorage.php View File

@@ -137,6 +137,16 @@ class SharedStorage extends \OC\Files\Storage\Wrapper\Jail implements ISharedSto

private function init() {
if ($this->initialized) {
if (!$this->storage) {
// marked as initialized but no storage set
// this is probably because some code path has caused recursion during the share setup
// we setup a "failed storage" so `getWrapperStorage` doesn't return null.
// If the share setup completes after this the "failed storage" will be overwritten by the correct one
$this->logger->warning('Possible share setup recursion detected');
$this->storage = new FailedStorage(['exception' => new \Exception('Possible share setup recursion detected')]);
$this->cache = new FailedCache();
$this->rootPath = '';
}
return;
}


Loading…
Cancel
Save