Allow copying file keys when storage has multiple mount points#39058
Allow copying file keys when storage has multiple mount points#39058AlexAndBear merged 4 commits intomasterfrom
Conversation
|
Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes. |
|
Kudos, SonarCloud Quality Gate passed! |
|
@janackermann Could your team please take care so this lands in 10.9? |
|
Related: #39015 |
also findByStorageId always returns an array
018d9aa to
078bd58
Compare
|
IIRC I tried digging into why findByStorageId returns more than one mount point for a single storageid. AFAICT a group share has child items, one for every user that accepted or renamed the incoming share. When moving files in and out of the share there is a code path that mounts the same underlying storage more than once, but since this happens during the setupFS() I could not dig into the exact reason where the mount manager would add another mount point. The best I could come up with was the storage initialization of source and target when copying the encryption keys. 🤔 From my understanding a cross storage move (initiated by a share recipient) calls core/lib/private/Encryption/Keys/Storage.php Line 386 in 78fcc9e |
|
Kudos, SonarCloud Quality Gate passed! |









cc @IljaN @cdamken
In the old logic might break when a group share has been mounted by multiple users and files are repeatedly moved in and out of that group share while encryption is enabled.
core/lib/private/Encryption/Keys/Storage.php
Line 386 in 78fcc9e
core/lib/private/Encryption/Keys/Storage.php
Line 344 in 78fcc9e
core/lib/private/Encryption/Keys/Storage.php
Lines 319 to 320 in 78fcc9e
core/lib/private/Files/Storage/Wrapper/Encryption.php
Line 783 in d329971