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

Prevent encrypted files from being corrupted when overwriting them #39623

Merged
merged 3 commits into from
Dec 28, 2021

Conversation

JammingBen
Copy link
Contributor

@JammingBen JammingBen commented Dec 28, 2021

Description

This fixes an issue where overwriting an encrypted file by a share recipient would corrupt it.

This is a regression which was introduced by #39516. An early return was implement in the getHeader() method which caused trouble with a) part files and b) the fix-encrypted-version-command. Therefore I reverted the change as it seemed to be an optimization only.

Related Issue

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

@owncloud owncloud deleted a comment from update-docs bot Dec 28, 2021
@sonarcloud
Copy link

sonarcloud bot commented Dec 28, 2021

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

@JammingBen
Copy link
Contributor Author

Not sure about the target branch here. This has to land in 10.9.1, ideally without all other changes in master that have been made in the meantime. But I think master is fine, we can cherry pick the commits if needed to a release-10.9.1 branch.

Copy link
Contributor

@micbar micbar left a comment

Choose a reason for hiding this comment

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

LGTM

@JammingBen JammingBen merged commit 94463d4 into master Dec 28, 2021
@delete-merged-branch delete-merged-branch bot deleted the fix-encryption-10.9 branch December 28, 2021 12:42
JammingBen added a commit that referenced this pull request Dec 28, 2021
JammingBen added a commit that referenced this pull request Dec 28, 2021
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.

encryption PHP unit tests fail
2 participants