-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Only perform login check during ownership transfer for encryption #26149
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
What's missing is that the file system is set up for the target users when they did not log in yet – then its not there and moving fails, with or without --move flag. |
Signed-off-by: Christoph Wurst <[email protected]>
16c7794 to
e68c4a4
Compare
|
| if ($destinationUser->getLastLogin() === 0 || !$this->encryptionManager->isReadyForUser($destinationUid)) { | ||
| // If encryption is on we have to ensure the user has logged in before and that all encryption modules are ready | ||
| if (($this->encryptionManager->isEnabled() && $destinationUser->getLastLogin() === 0) | ||
| || !$this->encryptionManager->isReadyForUser($destinationUid)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is a method that's not in the Interface. Do we want to put it there or declare that $this->encryptionManager is the implementation and not the interface even if it is in an app (it's still the files app which will always be shipped, but still)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or add it to the baseline 🙈
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nah let's inject the implementation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This wasn't taken care of and Psalm will complain 🤯
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know 🤷
|
/backport to stable21 |
|
/backport to stable20 |

With most simple storage we actually want data to be transferable to new users, even before the target user has logged in for the first time. Hence I'm scoping the login check to only be run when encryption is actually in use.
The check was added in #16439. @LEDfan did you use encryption in your tests back then?