Repository navigation
[encryption] don't check if we have a valid user during migration - #13952
Conversation
|
Please test code before push!! |
|
@schiesbn ^ |
4303fb4 to
b2e1322
Compare
|
Already fixed, saw it directly after push but didn't want to kill Jenkins |
|
Tests still run, that's not the final result. |
|
@owncloud-bot retest this please |
|
👍 fixes the issue, code change as discussed |
|
um, how can you setup the fs for a user if getHome cannot be executed for him? |
|
@blizzz good point... that sounds like that other issue where the user manager couldn't find the user and would setup invalid FS entries (see #12801 (comment)) |
|
if they are found by getUsers, userExists shouldn't be a problem either? |
|
Yes, makes sense. So the local users will be migrated first, but for every file it will migrate ALL share keys (without checking if the key owner exists). The remaining non-local users will get migrated with the |
|
@blizzz no, because for example you're migrating the local user "root" who shared a file with "ldapuser1". Calling Does that make sense ? |
|
The inspection completed: 2 new issues, 4 updated code elements |
|
Refer to this link for build results (access rights to CI server needed): |
|
👍 Validated patch 7.0.4->8.0.0 RC2 server edition LDAP user shares with LDAP user Files can be downloaded in all cases above after upgrade |
|
@karlitschek @DeepDiver1975 up to you to merge this now (your decision). |
[encryption] don't check if we have a valid user during migration
This problem happens if a system has local users and ldap users.
The first time the user opens ownCloud on the web interface the upgrade will be triggered. In this case we will only find the local users, not the ldap users, so we will migrate the local users only.
But now for any share from a local user to a ldap user the userExists() check will fail (because the ldap backend isn't loaded) and we will skip the share key.
This PR removes the check, in 99% of all use cases we will have a valid user. This is only problematic in the corner case where we have user names and file names where we are no longer able to detect the user name correctly which should happen really seldom. Even in this case nothing will be lost. The key will be only in the wrong folder and the admin will still have the backup we create before the migration. So he will be able to fix it manually. He will have to do this anyway if this corner-case happens, also with the old code where we skipped the key completely.
issue: #13950
cc @PVince81 @DeepDiver1975