strip .gpg
suffix from browser-provided password path
This commit is contained in:
@@ -33,6 +33,7 @@ func ValidateGpgBinary(gpgPath string) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func GpgDecryptFile(filePath string, gpgPath string) (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)
|
passwordFile, err := os.Open(filePath)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return "", err
|
return "", err
|
||||||
|
Reference in New Issue
Block a user