-
Notifications
You must be signed in to change notification settings - Fork 894
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix double encryption prevention (#346)
* Fix binary file bug double encryption prevention The `ensureNoMetadata` function was incorrectly implemented and called LoadEncryptedFile on the InputStore and checked whether the returned error was MetadataNotFound or not. In the case where loading the input file as an encrypted file would fail (e.g. due to syntax errors), it would incorrectly report the file as having a "sops" branch. When using the binary mode, it would try to load the file as an encrypted binary file (which is expected to be JSON), which would fail, thus triggering this error. * Add functional test for binary file roundtrip
- Loading branch information
Showing
2 changed files
with
33 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters