Skip to content

[stable35] fix(encryption): use the block size of the file encoding when fixing sizes - #65460

Merged
susnux merged 1 commit into
stable35from
backport/65426/stable35
Oct 15, 2026
Merged

susnux merged 1 commit into
stable35from
backport/65426/stable35

Conversation

@backportbot

@backportbot backportbot Bot commented Oct 13, 2026

Copy link
Copy Markdown

Backport of PR #65426

…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>
@backportbot
backportbot Bot requested a review from a team as a code owner October 13, 2026 09:43
@backportbot
backportbot Bot requested review from Altahrim, CarlSchwan, come-nc, salmart-dev, skjnldsv, sorbaugh and susnux and removed request for a team October 13, 2026 09:43
@backportbot backportbot Bot added this to the Nextcloud 35.0.2 milestone Oct 13, 2026
@susnux
susnux merged commit ac474c0 into stable35 Oct 15, 2026
222 of 226 checks passed
@susnux
susnux deleted the backport/65426/stable35 branch October 15, 2026 18:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants