From d3ef88e12cb127914fb0ead762b7baee6913592f Mon Sep 17 00:00:00 2001 From: Colin Date: Fri, 31 Mar 2023 05:03:20 +0000 Subject: [PATCH] strip `.gpg` suffix from browser-provided password path --- helpers/helpers.go | 1 + 1 file changed, 1 insertion(+) diff --git a/helpers/helpers.go b/helpers/helpers.go index 9877a1c..4a0e5f3 100644 --- a/helpers/helpers.go +++ b/helpers/helpers.go @@ -33,6 +33,7 @@ func ValidateGpgBinary(gpgPath string) error { } func GpgDecryptFile(filePath string, gpgPath string) (string, error) { + filePath = strings.TrimSuffix(filePath, ".gpg"); // browserpass-extension forcibly adds the .gpg extension passwordFile, err := os.Open(filePath) if err != nil { return "", err