Skip to content

Commit 40e4ac0

Browse files
committed
fix: check instance of storage using helper function
instanceof cannot be used to check the instance of a storage, doing so breaks the check in certain cases. In this case, enabling the `files_accesscontrol` app breaks the check. Signed-off-by: Salvatore Martire <4652631+salmart-dev@users.noreply.github.com>
1 parent 0ebdd2c commit 40e4ac0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

apps/dav/lib/Connector/Sabre/Directory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ public function getChild($name, $info = null, ?IRequest $request = null, ?IL10N
181181
// If we are, then only PUT and MKCOL are allowed (see plugin)
182182
// so we are safe to return the directory without a risk of
183183
// leaking files and folders structure.
184-
if ($storage instanceof PublicShareWrapper) {
184+
if ($storage?->instanceOfStorage(PublicShareWrapper::class)) {
185185
$share = $storage->getShare();
186186
$allowDirectory = ($share->getPermissions() & Constants::PERMISSION_READ) !== Constants::PERMISSION_READ;
187187
}

0 commit comments

Comments
 (0)