diff options
Diffstat (limited to 'cmd/goaes/commands/encrypt.go')
| -rw-r--r-- | cmd/goaes/commands/encrypt.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/cmd/goaes/commands/encrypt.go b/cmd/goaes/commands/encrypt.go index c658780..b50ef97 100644 --- a/cmd/goaes/commands/encrypt.go +++ b/cmd/goaes/commands/encrypt.go @@ -5,6 +5,7 @@ import ( "context" "encoding/gob" "os" + "path/filepath" "github.com/nerdsec/goaes/internal" "github.com/urfave/cli/v3" @@ -14,6 +15,7 @@ func Encrypt(ctx context.Context, cmd *cli.Command) error { source := cmd.String("source") destination := cmd.String("destination") + source = filepath.Clean(source) plaintext, err := os.ReadFile(source) if err != nil { return err |
