Skip to content

Fix issue restoring versions from the trashbin after sharing #39822

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

Merged
merged 2 commits into from
Feb 28, 2022

Conversation

jvillafanez
Copy link
Member

A folder contains a file with multiple versions. The folder is shared
with another user. That user deletes the shared file (with the
versions). Then, that user restores the file. At that point, the
versions were broken due to a bad signature.

Description

According to docs, versions are copied as such, so the signature in the file doesn't change. Since the signature doesn't change, the "encrypted" column shouldn't change neither.
Even if we're moving versions, we won't increase the "encrypted" value for the version in order to not disrupt the signature in the file.

Related Issue

#39664

Motivation and Context

Versions of the file were broken after following the steps described in the issue

How Has This Been Tested?

Manually tested following the steps

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Database schema changes (next release will require increase of minor version instead of patch)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests only (no source changes)

Checklist:

  • Code changes
  • Unit tests added
  • Acceptance tests added
  • Documentation ticket raised:
  • Changelog item, see TEMPLATE

@update-docs
Copy link

update-docs bot commented Feb 22, 2022

Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes.

A folder contains a file with multiple versions. The folder is shared
with another user. That user deletes the shared file (with the
versions). Then, that user restores the file. At that point, the
versions were broken due to a bad signature.
@jvillafanez jvillafanez force-pushed the encrypted_version_restore branch from a1af639 to bf12593 Compare February 28, 2022 08:54
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

100.0% 100.0% Coverage
0.0% 0.0% Duplication

@jvillafanez jvillafanez merged commit 03973ee into master Feb 28, 2022
@delete-merged-branch delete-merged-branch bot deleted the encrypted_version_restore branch February 28, 2022 12:28
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