Skip to content

Commit

Permalink
logcli: Remove port from TLS server name when provided in --addr (#5477)
Browse files Browse the repository at this point in the history
If connecting to a TLS secured endpoint with an explicit port,
ensure that ServerName contains only the host and not the port to avoid
a cert validation failure
  • Loading branch information
atomic77 authored Mar 29, 2022
1 parent d4dd4ed commit 3bf2efa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/logcli/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ func newQueryClient(app *kingpin.Application) client.Client {
if err != nil {
return err
}
client.TLSConfig.ServerName = u.Host
client.TLSConfig.ServerName = strings.Split(u.Host, ":")[0]
return nil
}

Expand Down

0 comments on commit 3bf2efa

Please sign in to comment.