mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
Trim mount point before matching in encryption code
Often times the mount point has a leading slash. This fix sanitizes it to make sure matching works. Signed-off-by: Vincent Petry <vincent@nextcloud.com>
This commit is contained in:
parent
4e5ed32025
commit
a704bcf97f
1 changed files with 1 additions and 1 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue