From 5c97b869a8092e9fb2583a514300e1dc3aba7088 Mon Sep 17 00:00:00 2001 From: Ethan Paul Date: Thu, 21 Mar 2024 18:16:43 -0400 Subject: [PATCH] Fix not stripping newlines out of vault password files Fixes #5 --- vault2vault.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vault2vault.py b/vault2vault.py index b090045..9624316 100644 --- a/vault2vault.py +++ b/vault2vault.py @@ -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"