-
-
Notifications
You must be signed in to change notification settings - Fork 4.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
fix: Autodetect legacy filekey instead of trusting the header for legacy header #45669
Conversation
…acy header Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
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 don't see the part where you autodetect the fileKey
We just tried this patch in a test environment and it seems to give access to the files that were broken before. (At least the ones in a moved folder, we haven't tested the files broken by resharing) |
Passing |
|
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
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.
All good after testing decrypt all
Pushed commit to attempt to fix tests |
5e297ff
to
01e3921
Compare
Signed-off-by: Louis Chemineau <louis@chmn.me>
01e3921
to
f244261
Compare
/backport to stable29 |
/backport to stable28 |
/backport to stable27 |
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.
Looks good but didn't test
/backport to stable27 |
/backport to stable28 |
/backport to stable29 |
Summary
When resharing, the filekey gets migrated to new encryption, but the header is untouched so it fails to open.
With this change we just autodetect which kind of filekey to use when opening unless we know for sure we do not need to use the old way.
Also refactored the decryptAll related code to use the same getFileKey method as the rest.
Should be tested.
Checklist