Skip to content

fix(versions): preserve version encrypted version before rollback#61562

Open
leftybournes wants to merge 1 commit into
masterfrom
leftybournes/fix/versions-restore-with-encryption
Open

fix(versions): preserve version encrypted version before rollback#61562
leftybournes wants to merge 1 commit into
masterfrom
leftybournes/fix/versions-restore-with-encryption

Conversation

@leftybournes

Copy link
Copy Markdown
Member

Summary

While rolling back, the created file version's encrypted version is set to 1 when it is actually higher, causing it to appear corrupted when restoring to it. This preserves the encrypted version for the created file version to prevent "corruption" from happening.

Checklist

AI (if applicable)

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

Signed-off-by: Kent Delante <kent@delante.me>
@leftybournes leftybournes added this to the Nextcloud 35 milestone Jun 24, 2026
@leftybournes leftybournes requested a review from a team as a code owner June 24, 2026 09:09
@leftybournes leftybournes requested review from Altahrim, ArtificialOwl, come-nc and provokateurin and removed request for a team June 24, 2026 09:09
$versionCache->update(
$versionFileInfo->getId(), [
'encrypted' => $encryptedVersion,
'encryptedVersion' => $encryptedVersion,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

encrypted should probably not get set or at least not to the version?

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.

[Bug]: Files Become Corrupted After Restoring a Version

2 participants