Skip to content

fix(encryption): Correctly report size for zero-byte encrypted files#60070

Open
cuppett wants to merge 1 commit intonextcloud:masterfrom
cuppett:cuppett/fix-zero-byte-size
Open

fix(encryption): Correctly report size for zero-byte encrypted files#60070
cuppett wants to merge 1 commit intonextcloud:masterfrom
cuppett:cuppett/fix-zero-byte-size

Conversation

@cuppett
Copy link
Copy Markdown
Contributor

@cuppett cuppett commented May 3, 2026

Summary

Files with 0 bytes no longer incorrectly report as 8192 bytes. Widens unencryptedSize to ?int, fixes verifyUnencryptedSize to compare against header size instead of 0, and corrects Scanner to populate unencrypted_size on initial upload.

Updates for a couple edge cases and simplifies to get more consistent recording of the size in the cache and database.

Spawned from #57279

Checklist

AI (if applicable)

  • The content of this PR was partly or fully generated using AI

Files with 0 bytes no longer incorrectly report as 8192 bytes. Widens unencryptedSize
to ?int, fixes verifyUnencryptedSize to compare against header size instead of 0,
and corrects Scanner to populate unencrypted_size on initial upload.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Stephen Cuppett <steve@cuppett.com>
@cuppett cuppett requested a review from a team as a code owner May 3, 2026 11:46
@cuppett cuppett requested review from Altahrim, ArtificialOwl, leftybournes and salmart-dev and removed request for a team May 3, 2026 11:46
@cuppett cuppett added this to the Nextcloud 34 milestone May 3, 2026
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.

1 participant