-
-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Log and continue when failing to update encryption keys during for individual files #26061
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rullzer
approved these changes
Mar 11, 2021
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.
Fine by me
PVince81
approved these changes
Mar 15, 2021
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.
Makes sense 👍
PVince81
added
4. to release
Ready to be released and/or waiting for tests to finish
and removed
3. to review
Waiting for reviews
labels
Mar 19, 2021
php:cs is not happy:
|
…dividual files Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
PVince81
force-pushed
the
bugfix/noid/encryption-update-failure
branch
from
March 19, 2021 13:12
cad1b91
to
82891cd
Compare
rebased, let's see if the problem disappears... |
/backport to stable21 |
/backport to stable20 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In cases where a single file update of encryption keys fails e.g. when creating a share, the share is created as the update is handled in the postShared/postUnshared hook though the actual request to create the share fails and will be in some inconsistent state.
In the specific case there was a single file that had somehow corrupted keys so the original owner also wasn't able to open it anymore. Now when the folder containing the file was shared to a group only the files that were updated before the failing file became accessible, but since the Sharing API request fails the UI didn't get a proper response that the folder was shared and all files after the corrupt one were inaccessible.
Logging helps to get a clue about the actual affected file here and makes share operations work again.
Example trace to the original exception thrown that blocks the unshare request: