Repository navigation
fix(encryption): use the block size of the file encoding when fixing sizes - #65426
Merged
Merged
Conversation
…sizes `fixUnencryptedSize()` asked the encryption module for the unencrypted block size before calling `begin()`. The module only learns the encoding of the file (binary or legacy base64) from the header in `begin()`, so the block size of binary encoded files was used for legacy base64 files. This stored an inflated unencrypted size for legacy files, which then breaks downloads: the announced content length is too large and the signature check of the last block fails with "Bad Signature". Fixes #63662 Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
susnux
requested review from
GhassenKefi,
icewind1991,
provokateurin,
salmart-dev and
sorbaugh
and removed request for
a team and
sorbaugh
October 12, 2026 15:00
Contributor
Author
|
/backport to stable35 |
Contributor
Author
|
/backport to stable34 |
Contributor
Author
|
/backport to stable33 |
CarlSchwan
approved these changes
Oct 13, 2026
skjnldsv
approved these changes
Oct 13, 2026
skjnldsv
left a comment
Member
There was a problem hiding this comment.
Code looks good to me! Though seems over-powered to have such precise occ command 😁
This was referenced Oct 13, 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.
Summary
fixUnencryptedSize()asked the encryption module for the unencrypted block size before callingbegin().The module only knows the encoding of the file (binary or legacy base64) from the header in
begin(), so the block size of binary encoded files was used for legacy base64 files.This stored an inflated unencrypted size for legacy files, which then breaks downloads: the announced content length is too large and the signature check of the last block fails with "Bad Signature".
Checklist
3. to review, feature component)stable32)AI (if applicable)
Tests created with help of Claude Code.