-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[OSS] security: update go to 1.20.1 #16263
Changes from all commits
2a8cdf1
716d162
2c757fa
f81c5d4
ff4f059
31bbca9
2f54191
c263147
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
```release-note:security | ||
Upgrade to use Go 1.20.1. | ||
This resolves vulnerabilities [CVE-2022-41724](https://go.dev/issue/58001) in `crypto/tls` and [CVE-2022-41723](https://go.dev/issue/57855) in `net/http`. | ||
``` |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
package consul | ||
|
||
import ( | ||
"crypto/rand" | ||
"encoding/base64" | ||
"fmt" | ||
"math/rand" | ||
Comment on lines
+4
to
-6
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
"os" | ||
"strings" | ||
"testing" | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,9 +40,9 @@ func TestCoordinate_Disabled_Response(t *testing.T) { | |
req, _ := http.NewRequest("PUT", "/should/not/care", nil) | ||
resp := httptest.NewRecorder() | ||
obj, err := tt(resp, req) | ||
if err, ok := err.(HTTPError); ok { | ||
if err.StatusCode != 401 { | ||
t.Fatalf("expected status 401 but got %d", err.StatusCode) | ||
if httpErr, ok := err.(HTTPError); ok { | ||
if httpErr.StatusCode != 401 { | ||
t.Fatalf("expected status 401 but got %d", httpErr.StatusCode) | ||
Comment on lines
+43
to
+45
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This was triggering linter errors. |
||
} | ||
} else { | ||
t.Fatalf("expected HTTP error but got %v", err) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
module github.com/hashicorp/consul/api | ||
|
||
go 1.18 | ||
go 1.20 | ||
|
||
replace github.com/hashicorp/consul/sdk => ../sdk | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
ARG GOLANG_VERSION=1.19.2 | ||
ARG GOLANG_VERSION=1.20.1 | ||
FROM golang:${GOLANG_VERSION} | ||
|
||
WORKDIR /consul |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,7 +13,6 @@ import ( | |
|
||
"github.com/hashicorp/consul/agent" | ||
consulapi "github.com/hashicorp/consul/api" | ||
"github.com/hashicorp/consul/lib" | ||
) | ||
|
||
// TODO(partitions): split these tests | ||
|
@@ -206,8 +205,6 @@ func zip(t *testing.T, k, v []string) map[string]string { | |
} | ||
|
||
func TestSortByMemberNamePartitionAndSegment(t *testing.T) { | ||
lib.SeedMathRand() | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is no longer needed anywhere because the math/rand package will automatically generate a random seed starting in 1.20. |
||
|
||
// For the test data we'll give them names that would sort them backwards | ||
// if we only sorted by name. | ||
newData := func() []*consulapi.AgentMember { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
module github.com/hashicorp/consul | ||
|
||
go 1.19 | ||
go 1.20 | ||
|
||
replace ( | ||
github.com/hashicorp/consul/api => ./api | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated to be compatible with go 1.20