Skip to content

1.2.4: prevent overwriting of data when encrypting/decrypting

Latest
Compare
Choose a tag to compare
@sanjayankur31 sanjayankur31 released this 06 May 22:39
· 7 commits to main since this release
1.2.4
92a0ec9

This adds checks to the encrypt and decrypt functions to prevent these
operations from overwriting newer files.

Case 1:

if file A.gpg is to be decrypted, but there's already a file A that is
newer than A.gpg, this indicates that the user has made some
modifications to A, and this should not be overwritten.

Case 2:

if A is to be encrypted but A.gpg exists and is newer than A, it
indicates that a newer version of A has been encrypted at some point.
Encrypting A now to create A.gpg would be a lossy conversion, since data
in the newer A.gpg may be lost.