[Bug]: NC28.0.2, post update encryption failing for one user #43315
Labels
0. Needs triage
Pending check for reproducibility or if it fits our roadmap
28-feedback
bug
feature: encryption (server-side)
regression
Bug description
I updated from 27.1.6 to 28.0.2. After the update, one user (the admin user) is unable to see any files in the Web App -- loading the Files tab shows no files. This is similar to #43268 in that only one user is affected, but I have server side encryption on, so it's not exactly the same. The browser tools shows that the PROPFIND part returns a 500 Internal Server Error, which is similar to #43269, except again I have the server side encryption on.
On the server side, the nextcloud log (fragment included below) on the PROPFIND call says "Cannot decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you.", however, adding a debug printout to lib/private/Encryption/Keys/Storage.php in getKey() reveals that it is trying to load the fileKey for a file that has not been shared. So this is probably a misleading error.
The unaffected users have {fileKey,username.shareKey} under files_encryption/.../OC_DEFAULT_MODULE for each file, and the admin user has {recoveryKey_########.sharekey,username.shareKey} for each file. So it looks like the problem could be that the admin user's fileKeys got erased during the upgrade? On the other hand, the admin user can see files via the "Activity" or "Photos" tabs, so it seems like the files are present and decrypt-able, so that makes it seem more like a bug. Eg, the decryption machinery works when reaching the files via Photos (which must not need PROPFIND) but fails to list all files (which does need PROPFIND).
Master key is off, recovery key is on for the affected admin user.
Steps to reproduce
Expected behavior
Files should show up in the files tab, no 500 errors
Installation method
Community Web installer on a VPS or web space
Nextcloud Server version
28
Operating system
Debian/Ubuntu
PHP engine version
PHP 8.1
Web server
Apache (supported)
Database engine version
MySQL
Is this bug present after an update or on a fresh install?
Upgraded to a MAJOR version (ex. 22 to 23)
Are you using the Nextcloud Server Encryption module?
Encryption is Enabled
What user-backends are you using?
Configuration report
List of activated Apps
Nextcloud Signing status
Nextcloud Logs
Additional info
No response
The text was updated successfully, but these errors were encountered: