BE-7712 Fixed an issue where child KD folder keys are not decrypted correctly#170
Merged
Conversation
tylerccarson
approved these changes
Jun 12, 2026
This file contains hidden or 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
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.
Changes
Before the fix, the
unwrapKeys()was used to decrypt child KD folder keys. But the function used thePromise.all()under the hood, which runs decryption of keys asynchronously. This caused issues when child folders have parent-child relationship where the child's key should be decrypted by the parent key. Due to the async process, there was a chance where the child key was processed before the parent's key, which resulted in the decryption failure. To avoid the issue, theunwrapKey()was used instead.v17.2.7