Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrap-up changes for updated subfolders #405

Merged
merged 36 commits into from
Jan 31, 2024

Conversation

artonge
Copy link
Collaborator

@artonge artonge commented Mar 20, 2023

Add changes to support sharing and sub folders brought by the v2 encryption format.

  • Add special handling for unsharing files fromE2EE folders, which conflicted with the deletion process
  • Support wrapping up changes for subfolders
  • Add counter logic to prevent overriding more recent metadata, and prevents rollback attacks
  • Add signature logic to protect against metadata update from unauthorized parties
  • We need to support v1 and v2 encryption version, so we duplicated some code
  • List of changes per files:
    • MetaDataController
      • Add support for signature
      • Improve locking logic for filedrop updates
    • MetaDataStorage
      • Add support for signature and counter
      • Keep track of touched folders
    • LockingController
      • Add support for counter
      • Support aborting changes during unlock
      • Support finalizing changes in touch subfolders
    • LockManager
      • Check counter when locking file
      • Add possibility to assert locked by token in isLocked
    • V1/MetaDataController
      • Improve locking logic for filedrop updates
    • MetadataStorageV1 // No changes
    • V1/LockingController // No changes
    • LockStorageV1
      • Add possibility to assert locked by token in isLocked
    • RollbackServiceV1 // No changes
    • E2EEPublicShareTemplateProvider
      • Add encryption version and users public keys in initial state
    • Front files: adapt to new API requirements
  • ClientHasCapabilityMiddleware --> Return an error to old clients when they access a v2.0 encrypted folder.

Fix:

@artonge artonge added 3. to review Waiting for reviews enhancement New feature or request php Pending a documentation update/fix labels Mar 20, 2023
@artonge artonge self-assigned this Mar 20, 2023
@artonge artonge changed the title Wrap-up changes in subfolder Wrap-up changes for updated subfolders Mar 20, 2023
@artonge artonge force-pushed the artonge/feat/allow_metadata_update_for_subfolders branch 4 times, most recently from 8992567 to b0c7fb4 Compare March 20, 2023 19:03
@artonge artonge marked this pull request as draft April 3, 2023 13:17
@artonge
Copy link
Collaborator Author

artonge commented May 9, 2023

/rebase

@nextcloud-command nextcloud-command force-pushed the artonge/feat/allow_metadata_update_for_subfolders branch from b0c7fb4 to b1cc567 Compare May 9, 2023 09:03
@artonge artonge force-pushed the artonge/feat/allow_metadata_update_for_subfolders branch 3 times, most recently from 9930c7e to 8eea85c Compare May 23, 2023 13:31
@artonge artonge force-pushed the artonge/feat/allow_metadata_update_for_subfolders branch from 8eea85c to 98960c6 Compare May 23, 2023 16:10
@artonge artonge added the pending documentation Pending a documentation update/fix label May 23, 2023
@artonge artonge force-pushed the artonge/feat/allow_metadata_update_for_subfolders branch 3 times, most recently from 79fa58f to babb464 Compare May 23, 2023 18:32
src/services/filedrop.js Outdated Show resolved Hide resolved
lib/MetaDataStorage.php Outdated Show resolved Hide resolved
lib/Controller/LockingController.php Show resolved Hide resolved
lib/Controller/MetaDataController.php Outdated Show resolved Hide resolved
@artonge artonge force-pushed the artonge/feat/allow_metadata_update_for_subfolders branch 3 times, most recently from cecc7de to dcd5f5d Compare May 23, 2023 21:02
@artonge artonge removed the pending documentation Pending a documentation update/fix label May 24, 2023
@artonge artonge force-pushed the artonge/feat/allow_metadata_update_for_subfolders branch from 3ce5ccc to aa90b4d Compare May 24, 2023 15:09
@artonge artonge force-pushed the artonge/feat/allow_metadata_update_for_subfolders branch 3 times, most recently from e14aa02 to f2dafbc Compare June 5, 2023 09:45
Signed-off-by: Louis Chemineau <louis@chmn.me>
Signed-off-by: Louis Chemineau <louis@chmn.me>
@artonge artonge force-pushed the artonge/feat/allow_metadata_update_for_subfolders branch from f51c345 to cd7c4bd Compare January 16, 2024 16:28
Signed-off-by: Louis Chemineau <louis@chmn.me>
Signed-off-by: Louis Chemineau <louis@chmn.me>
Signed-off-by: Louis Chemineau <louis@chmn.me>
Signed-off-by: Louis Chemineau <louis@chmn.me>
Signed-off-by: Louis Chemineau <louis@chmn.me>
@artonge artonge force-pushed the artonge/feat/allow_metadata_update_for_subfolders branch 2 times, most recently from 0d8cf72 to 55c1537 Compare January 23, 2024 16:49
Copy link
Contributor

@susnux susnux left a comment

Choose a reason for hiding this comment

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

Frontend look good, just some minor comments

src/views/FileDrop.vue Outdated Show resolved Hide resolved
src/views/FileDrop.vue Outdated Show resolved Hide resolved
src/views/FileDrop.vue Outdated Show resolved Hide resolved
src/services/crypto.js Outdated Show resolved Hide resolved
src/services/crypto.js Outdated Show resolved Hide resolved
Signed-off-by: Louis Chemineau <louis@chmn.me>
Signed-off-by: Louis Chemineau <louis@chmn.me>
Signed-off-by: Louis Chemineau <louis@chmn.me>
Signed-off-by: Louis Chemineau <louis@chmn.me>
Signed-off-by: Louis Chemineau <louis@chmn.me>
Signed-off-by: Louis Chemineau <louis@chmn.me>
Signed-off-by: Louis Chemineau <louis@chmn.me>
Signed-off-by: Louis Chemineau <louis@chmn.me>
Signed-off-by: Louis Chemineau <louis@chmn.me>
@artonge artonge force-pushed the artonge/feat/allow_metadata_update_for_subfolders branch from 08dfc4e to b1892d4 Compare January 31, 2024 14:17
src/services/filedrop.js Outdated Show resolved Hide resolved
@artonge artonge merged commit cee53f2 into master Jan 31, 2024
36 checks passed
@delete-merged-branch delete-merged-branch bot deleted the artonge/feat/allow_metadata_update_for_subfolders branch January 31, 2024 15:51
@artonge
Copy link
Collaborator Author

artonge commented Feb 1, 2024

/backport to stable28

@backportbot backportbot bot added the backport-request Pending backport by the backport-bot label Feb 1, 2024
@backportbot backportbot bot removed the backport-request Pending backport by the backport-bot label Feb 1, 2024
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 enhancement New feature or request php Pending a documentation update/fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants