cryptomator / cryptofs

Java Filesystem Provider with integrated encryption
GNU Affero General Public License v3.0
93 stars 35 forks source link

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

Closed infeo closed 1 year ago

infeo commented 1 year ago

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.