strip .gpg suffix from browser-provided password path

This commit is contained in:
2023-03-31 05:03:20 +00:00
parent 0ada39be78
commit d3ef88e12c

View File

@@ -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