aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private
diff options
context:
space:
mode:
authorCôme Chilliet <come.chilliet@nextcloud.com>2024-10-14 17:23:29 +0200
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>2024-12-19 14:16:48 +0000
commit97800c555d96ad8936fe04341af8ee28e67c32c9 (patch)
treed7b025c36a6358cb77be34095e61c53dcf4af50e /lib/private
parente1a23cf0a74273acd57eb03789c67a5b0cc6905b (diff)
downloadnextcloud-server-97800c555d96ad8936fe04341af8ee28e67c32c9.tar.gz
nextcloud-server-97800c555d96ad8936fe04341af8ee28e67c32c9.zip
fix: Use getRelativePath method to check if node is inside folder
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'lib/private')
-rw-r--r--lib/private/Share20/Manager.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/private/Share20/Manager.php b/lib/private/Share20/Manager.php
index 6b255394f0b..4f02e45c735 100644
--- a/lib/private/Share20/Manager.php
+++ b/lib/private/Share20/Manager.php
@@ -1216,7 +1216,8 @@ class Manager implements IManager {
/* Ignore share of non-existing node */
continue;
}
- if (str_starts_with($path, $node->getPath() . '/') || ($path === $node->getPath())) {
+ if ($node->getRelativePath($path) !== null) {
+ /* If relative path is not null it means the shared node is the same or in a subfolder */
$reshareRecords[] = $share;
}
}