Skip to content

Commit 17b1d0d

Browse files
mcbrydeanekkantimattkim
authored
Changed to path/filepath, added min TLS in server connection (#10)
Co-authored-by: Abhinav Nekkanti <10552725+anekkanti@users.noreply.github.com> Co-authored-by: mattkim <matt@temporal.io>
1 parent 353edaf commit 17b1d0d

3 files changed

Lines changed: 5 additions & 4 deletions

File tree

app/connection.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ func GetServerConnection(c *cli.Context) (context.Context, *grpc.ClientConn, err
2828
option = grpc.WithInsecure()
2929
default:
3030
option = grpc.WithTransportCredentials(credentials.NewTLS(&tls.Config{
31+
MinVersion: tls.VersionTLS12,
3132
ServerName: hostname,
3233
}))
3334
}

app/flags.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ package app
22

33
import (
44
"os"
5-
"path"
5+
"path/filepath"
66

77
"github.com/urfave/cli/v2"
88
)
@@ -27,7 +27,7 @@ var (
2727
}
2828
ConfigDirFlag = &cli.PathFlag{
2929
Name: ConfigDirFlagName,
30-
Value: path.Join(os.Getenv("HOME"), ".config", "tcld"),
30+
Value: filepath.Join(os.Getenv("HOME"), ".config", "tcld"),
3131
Usage: "the config directory to use",
3232
Hidden: true,
3333
Required: false,

app/login.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
"net/http"
99
"net/url"
1010
"os"
11-
"path"
11+
"path/filepath"
1212
"strings"
1313
"time"
1414

@@ -56,7 +56,7 @@ type (
5656

5757
func getTokenConfigPath(ctx *cli.Context) string {
5858
configDir := ctx.Path(ConfigDirFlagName)
59-
return path.Join(configDir, tokenFileName)
59+
return filepath.Join(configDir, tokenFileName)
6060
}
6161

6262
// TODO: support login config on windows

0 commit comments

Comments
 (0)