Skip to content

Commit

Permalink
Fix not stripping newlines out of vault password files
Browse files Browse the repository at this point in the history
Fixes #5
  • Loading branch information
enpaul committed Mar 21, 2024
1 parent 67af43c commit 5c97b86
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion vault2vault.py
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ def _load_password(
if fpath:
try:
with Path(fpath).resolve().open("rb") as infile:
return VaultSecret(infile.read())
return VaultSecret(infile.read().strip())
except (FileNotFoundError, PermissionError) as err:
raise RuntimeError(
f"Specified vault password file '{fpath}' does not exist or is unreadable"
Expand Down

0 comments on commit 5c97b86

Please sign in to comment.