Skip to content

feat(e2ee): add a way to trigger a reupload of encryption metadata#10286

Open
mgallien wants to merge 5 commits into
masterfrom
feat/endToEndEncryptionRepairBrokenMetadata
Open

feat(e2ee): add a way to trigger a reupload of encryption metadata#10286
mgallien wants to merge 5 commits into
masterfrom
feat/endToEndEncryptionRepairBrokenMetadata

Conversation

@mgallien

@mgallien mgallien commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator

if encryption metadata are broken, upload a new version of the metadata built from local state to repair access to files and be able to work again with it

Resolves

#

Summary

TODO

  • ...

Checklist

AI (if applicable)

@mgallien
mgallien force-pushed the feat/endToEndEncryptionRepairBrokenMetadata branch 3 times, most recently from ca34b1e to 0b35fd3 Compare July 2, 2026 14:01
@mgallien
mgallien force-pushed the feat/endToEndEncryptionRepairBrokenMetadata branch 7 times, most recently from e8539b0 to 33662af Compare July 16, 2026 14:37
@mgallien
mgallien marked this pull request as ready for review July 16, 2026 14:39
@mgallien mgallien added this to the 35.0.0 milestone Jul 16, 2026

@nilsding nilsding left a comment

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.

some smaller comments, looks fine overall so far

Comment thread src/gui/accountsettings.cpp Outdated
Comment thread src/libsync/clientsideencryption.cpp Outdated

QString RepairFolderEncryptionMetadataJob::errorString() const
{
return _errorString;

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.

the _errorString is never modified, not sure if this is intentional

what happens when uploading the repaired metadata failed?

@mgallien
mgallien force-pushed the feat/endToEndEncryptionRepairBrokenMetadata branch 2 times, most recently from d5fe971 to 8c5d391 Compare July 17, 2026 12:47
mgallien added 2 commits July 17, 2026 15:22
clazy can checks for data types involved in MOC code to be fully
qualified

fix all issues reported

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
we may need to unlock encrypted folders

to do it, encryption must be in a working stae: skip it if encryption is
not ready

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
@mgallien
mgallien force-pushed the feat/endToEndEncryptionRepairBrokenMetadata branch from 8c5d391 to 33544be Compare July 17, 2026 14:00
mgallien added 3 commits July 17, 2026 17:11
if encryption metadata are broken, upload a new version of the metadata
built from local state to repair access to files and be able to work
again with it

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
to do proper data recovery for the encryption metadata, use local
information to rebuild an as correct as possible view of the encrypted
folder

use that information to generate a new metadata from scratch

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
@mgallien
mgallien force-pushed the feat/endToEndEncryptionRepairBrokenMetadata branch from 33544be to 22c8b60 Compare July 17, 2026 15:11
@github-actions

Copy link
Copy Markdown
Contributor

Artifact containing the AppImage: nextcloud-appimage-pr-10286.zip

Digest: sha256:51bf21132fd49c993e3560011c6067ccc21660a7d56c1a49eed07b1b8400e818

To test this change/fix you can download the above artifact file, unzip it, and run it.

Please make sure to quit your existing Nextcloud app and backup your data.

@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
19.4% Coverage on New Code (required ≥ 80%)
3.4% Duplication on New Code (required ≤ 3%)
D Security Rating on New Code (required ≥ A)
347 New Code Smells (required ≤ 0)
D Maintainability Rating on New Code (required ≥ A)
3 New Bugs (required ≤ 0)
E Reliability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

💡 Need a hand with PR review? Try Gitar by Sonar!

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.

2 participants