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

Truncate encrypted files only to fileHeader.size() #166

Merged
merged 15 commits into from
Apr 11, 2023

Conversation

infeo
Copy link
Member

@infeo infeo commented Mar 31, 2023

Fixes #165 by only truncate the encrypted file to the size of the file header. Supersedes #160.

Additionally, the file header is now also shared between all file channels, otherwise illegal data could be written.

@overheadhunter There is still one TODO in https://github.com/cryptomator/cryptofs/pull/166/files#diff-15d6933f57310ad1f46283cac44dd67f4553984a74ddeb45e49a84fb3c82ce5fR187. Need your feedback there. Solved.

@infeo infeo added this to the 2.6.3 milestone Mar 31, 2023
@infeo infeo self-assigned this Mar 31, 2023
Copy link
Member

@overheadhunter overheadhunter left a comment

Choose a reason for hiding this comment

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

This is the right direction, but I think we can relax the atomicity of writing the header

@infeo infeo modified the milestones: 2.6.3, 2.6.4 Apr 4, 2023
@infeo infeo merged commit f426f74 into develop Apr 11, 2023
@infeo infeo deleted the feature/165-dont-truncate-header branch April 11, 2023 21:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Possible invalid ciphertext file when truncate-open a file while concurrently writing to it
2 participants