-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Respect home folder setting in encryption #26818
Conversation
@DeepDiver1975, thanks for your PR! By analyzing the history of the files in this pull request, we identified @PVince81 to be a potential reviewer. |
Weird, normally when using views the user's home folder is supposed to be already mounted there. |
As far as I can tell the user's folder is properly mounted but the encryption code tries to access the keys with the uid - ignoring the home folder setting. |
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.
👍 confirmed to work so far
@@ -170,8 +170,8 @@ protected function constructUserKeyPath($encryptionModuleId, $keyId, $uid) { | |||
if ($uid === null) { | |||
$path = $this->root_dir . '/' . $this->encryption_base_dir . '/' . $encryptionModuleId . '/' . $keyId; | |||
} else { | |||
$path = $this->root_dir . '/' . $uid . $this->encryption_base_dir . '/' | |||
. $encryptionModuleId . '/' . $uid . '.' . $keyId; | |||
$home = $this->util->getUserHomeFolder($uid); |
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 would expect $home to be "root_dir . $home"
Let's close in favor of the alternative: #26820 Apps should not have to care about getHome, they work on the existing OC virtual filesystem where the user's home must be mounted. However the subtle thing is that even if we forgot to mount the user's home, if the user id matches the user id on disk, it magically works because the folder has the same name... That's how such issues sneak in. |
👎 |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Description
In case the user backend defines the user home folder to be in a different place then data/$uid encryption will fail to find the keys.
How Has This Been Tested?
In case you cannot setup an ldap use this patch:
Screenshots (if appropriate):
Types of changes
Checklist: