strip `.gpg` suffix from browser-provided password path
This commit is contained in:
parent
85bdb08379
commit
8de7959fa5
|
@ -6,6 +6,7 @@ import (
|
|||
"os"
|
||||
"os/exec"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
"github.com/browserpass/browserpass-native/errors"
|
||||
"github.com/browserpass/browserpass-native/response"
|
||||
|
@ -134,6 +135,7 @@ func validateGpgBinary(gpgPath string) error {
|
|||
}
|
||||
|
||||
func decryptFile(store *store, file string, gpgPath string) (string, error) {
|
||||
file = strings.TrimSuffix(file, ".gpg"); // browserpass-extension forcibly adds the .gpg extension
|
||||
passwordFilePath := filepath.Join(store.Path, file)
|
||||
passwordFile, err := os.Open(passwordFilePath)
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in New Issue