summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorblizzz <blizzz@arthur-schiwon.de>2022-06-02 13:47:18 +0200
committerGitHub <noreply@github.com>2022-06-02 13:47:18 +0200
commit1d1b9d936b461ee9ae7242a692fce443e452e84b (patch)
tree4486a4760c163c89049e241adc901a917a8d562f /lib
parent01bb642901996d2e9859f42c376b99178f2d94ef (diff)
parentb212e8dcc937ee574e03131be8a3645fd5e0b9fa (diff)
downloadnextcloud-server-1d1b9d936b461ee9ae7242a692fce443e452e84b.tar.gz
nextcloud-server-1d1b9d936b461ee9ae7242a692fce443e452e84b.zip
Merge pull request #32690 from nextcloud/bugfix/noid/fix-mountpoint-matching-encryption
Trim mount point before matching in encryption code
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Encryption/Util.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/private/Encryption/Util.php b/lib/private/Encryption/Util.php
index 693e24c4721..174af2e8b89 100644
--- a/lib/private/Encryption/Util.php
+++ b/lib/private/Encryption/Util.php
@@ -304,7 +304,7 @@ class Util {
$storageService = \OC::$server->get(GlobalStoragesService::class);
$storages = $storageService->getAllStorages();
foreach ($storages as $storage) {
- if (strpos($path, '/files/' . $storage->getMountPoint()) === 0) {
+ if (strpos($path, '/files/' . ltrim($storage->getMountPoint(), '/')) === 0) {
if ($this->isMountPointApplicableToUser($storage, $uid)) {
return true;
}