Skip to content

[stable33] fix: only use unencrypted_size if set to a value - #64964

Open
backportbot[bot] wants to merge 2 commits into
stable33from
backport/64963/stable33
Open

backportbot[bot] wants to merge 2 commits into
stable33from
backport/64963/stable33

Conversation

@backportbot

@backportbot backportbot Bot commented Sep 30, 2026

Copy link
Copy Markdown

Backport of PR #64963

@backportbot
backportbot Bot requested a review from a team as a code owner September 30, 2026 20:34
@backportbot
backportbot Bot requested review from Altahrim, CarlSchwan, leftybournes and salmart-dev and removed request for a team September 30, 2026 20:34
@backportbot backportbot Bot added bug 3. to review Waiting for reviews labels Sep 30, 2026
@backportbot backportbot Bot added this to the Nextcloud 33.0.10 milestone Sep 30, 2026
@susnux
susnux marked this pull request as draft September 30, 2026 21:25
@backportbot
backportbot Bot force-pushed the backport/64963/stable33 branch from 07c4418 to f889e09 Compare October 5, 2026 06:11
susnux added 2 commits October 5, 2026 10:54
Resolves e2ee which cannot store unencrypted size displaying size `0 B`
because the Cache entry is initialized always to `unencrypted_size = 0`
in `cacheEntryFromData`.

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
…d files

fix(files): keep the zero-byte plaintext size of server side encrypted files

Preferring `unencrypted_size` only when it is greater than zero also drops

the plaintext size of a server side encrypted file whose content is empty,

where the cache holds `size` of one encryption header and `unencrypted_size`

of 0.

Only files carry the server side encryption mark, so an `encrypted` folder

got the flag from end-to-end encryption, which does not maintain

`unencrypted_size`. Decide by node type instead and route the three

diverging conditions through one predicate.

Assisted-by: ClaudeCode:claude-opus-5

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>

[skip ci]
@backportbot
backportbot Bot force-pushed the backport/64963/stable33 branch from f889e09 to ff82295 Compare October 5, 2026 10:54
@susnux
susnux marked this pull request as ready for review October 5, 2026 10:54

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant