You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Cross user backend sharing encryption key migration fails on update #13950
Setup OC 7.0.4 with LDAP and with "root" as the local admin user
Enable encryption
Login as LDAP user "ldapuser1" to init encryption keys
As "root", share a folder "test" with a ldap user "ldapuser1"
Upgrade to OC 8.0.0~RC2
Run ./occ encryption:migrate to migrate the LDAP keys
Login as "ldapuser1" and try downloading the files from the folder "test"
Expected result
Files can be downloaded. Share keys properly migrated
Actual result
Files cannot be downloaded.
It looks like only the keys from the user "root" have been migrated, not the ones from the LDAP users.
After talking to @schiesbn it seems it could be the same issue with app update order like #13865 where the LDAP app isn't loaded (or loaded too late) during an update, so the migration code (the part that runs during update) doesn't find the LDAP users.
A quickfix would be to remove the "userExists()" check that is done during key migration to make sure all keys are simply copied.
I guess this issue only happens when sharing between users from different backends.
I'll retest this when sharing between LDAP users and see whether it happens too.
I can confirm that @blizzz's script with loading order works: #13865 (but is not ready for production)
It also makes the migration script obsolete, the users seemed to be migrated properly (but might be useful if people ran into timeout when upgrading in the web UI)
Next step: test @schiesbn's quickfix (which is more suited as a quick fix)
Activity
PVince81 commentedon Feb 6, 2015
To try:
PVince81 commentedon Feb 6, 2015
CC @jnfrmarks
PVince81 commentedon Feb 6, 2015
PVince81 commentedon Feb 6, 2015
I can confirm that files shared between two LDAP users are properly migrated by the script (given that #13951 doesn't kick in).
The error case is only when sharing cross-backend.
Next step: test the fixes
PVince81 commentedon Feb 6, 2015
I can confirm that @blizzz's script with loading order works: #13865 (but is not ready for production)
It also makes the migration script obsolete, the users seemed to be migrated properly (but might be useful if people ran into timeout when upgrading in the web UI)
Next step: test @schiesbn's quickfix (which is more suited as a quick fix)
karlitschek commentedon Feb 6, 2015
@jnfrmarks Can you help testing this? This is critical
PVince81 commentedon Feb 6, 2015
@schiesbn's patch worked for me: #13952
With that one, I still need to run "sudo -uwww ./occ encryption:migrate-keys" which is fine short term.
schiessle commentedon Feb 6, 2015
sure,nothing changes with respect to the occ script.
jnfrmarks commentedon Feb 6, 2015
testing underway
MorrisJobke commentedon Feb 6, 2015
Fixed with #13952