From c605593267d573e184e37aa9425cce44de95eece Mon Sep 17 00:00:00 2001 From: knative-automation Date: Wed, 31 Mar 2021 02:35:21 -0700 Subject: [PATCH] upgrade to latest dependencies (#468) bumping knative.dev/pkg 3b7934e...808d622: > 808d622 Escape path before returning it in a response (# 2075) > 71e938e Fix int conversion in statefulset ordinals (# 2074) Signed-off-by: Knative Automation --- go.mod | 2 +- go.sum | 4 ++-- vendor/knative.dev/pkg/leaderelection/config.go | 4 ++-- vendor/knative.dev/pkg/webhook/webhook.go | 3 ++- vendor/modules.txt | 2 +- 5 files changed, 8 insertions(+), 7 deletions(-) diff --git a/go.mod b/go.mod index cc0883ee9..858bea379 100644 --- a/go.mod +++ b/go.mod @@ -12,6 +12,6 @@ require ( k8s.io/client-go v0.20.2 knative.dev/hack v0.0.0-20210325223819-b6ab329907d3 knative.dev/networking v0.0.0-20210329132124-45fe1f5dd35e - knative.dev/pkg v0.0.0-20210330073320-3b7934e599fb + knative.dev/pkg v0.0.0-20210330162221-808d62257db6 sigs.k8s.io/yaml v1.2.0 ) diff --git a/go.sum b/go.sum index ba6042334..acc337834 100644 --- a/go.sum +++ b/go.sum @@ -1234,8 +1234,8 @@ knative.dev/networking v0.0.0-20210329132124-45fe1f5dd35e h1:KVdsfMbpNRON/IMxZJk knative.dev/networking v0.0.0-20210329132124-45fe1f5dd35e/go.mod h1:sfplBxhMqToDapZRmMK2CWvaKmmIEH9MSDCF+c1uMGE= knative.dev/pkg v0.0.0-20210329065222-9d92ea16c0d3 h1:JMuMvGa1ke9b8nBcDntQyy1fsJgBy/R7/La3kxiHSGg= knative.dev/pkg v0.0.0-20210329065222-9d92ea16c0d3/go.mod h1:PD5g8hUCXq6iR3tILjmZeJBvQfXGnHMPKryq54qHJhg= -knative.dev/pkg v0.0.0-20210330073320-3b7934e599fb h1:xZ7pyPKZTLiDWN4hBTNde5NzmuPKFaV3NVItE18qRZY= -knative.dev/pkg v0.0.0-20210330073320-3b7934e599fb/go.mod h1:PD5g8hUCXq6iR3tILjmZeJBvQfXGnHMPKryq54qHJhg= +knative.dev/pkg v0.0.0-20210330162221-808d62257db6 h1:hl6lY5ShQ7g7E0I+nPbknXwOOgaKmkJ+7TkCrCo80x0= +knative.dev/pkg v0.0.0-20210330162221-808d62257db6/go.mod h1:PD5g8hUCXq6iR3tILjmZeJBvQfXGnHMPKryq54qHJhg= pgregory.net/rapid v0.3.3/go.mod h1:UYpPVyjFHzYBGHIxLFoupi8vwk6rXNzRY9OMvVxFIOU= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= diff --git a/vendor/knative.dev/pkg/leaderelection/config.go b/vendor/knative.dev/pkg/leaderelection/config.go index 96164bd00..3d9df1dc7 100644 --- a/vendor/knative.dev/pkg/leaderelection/config.go +++ b/vendor/knative.dev/pkg/leaderelection/config.go @@ -134,8 +134,8 @@ type statefulSetID struct { func (ssID *statefulSetID) Decode(v string) error { if i := strings.LastIndex(v, "-"); i != -1 { - ui, err := strconv.ParseUint(v[i+1:], 10, 64) - ssID.ordinal = int(ui) + ui, err := strconv.Atoi(v[i+1:]) + ssID.ordinal = ui ssID.ssName = v[:i] return err } diff --git a/vendor/knative.dev/pkg/webhook/webhook.go b/vendor/knative.dev/pkg/webhook/webhook.go index ef578c4ee..ab54e36b5 100644 --- a/vendor/knative.dev/pkg/webhook/webhook.go +++ b/vendor/knative.dev/pkg/webhook/webhook.go @@ -21,6 +21,7 @@ import ( "crypto/tls" "errors" "fmt" + "html" "net/http" "time" @@ -140,7 +141,7 @@ func New( } webhook.mux.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { - http.Error(w, fmt.Sprint("no controller registered for: ", r.URL.Path), http.StatusBadRequest) + http.Error(w, fmt.Sprint("no controller registered for: ", html.EscapeString(r.URL.Path)), http.StatusBadRequest) }) for _, controller := range controllers { diff --git a/vendor/modules.txt b/vendor/modules.txt index cce8ef2c6..1aba0e6cd 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -951,7 +951,7 @@ knative.dev/networking/test/test_images/runtime/handlers knative.dev/networking/test/test_images/timeout knative.dev/networking/test/test_images/wsserver knative.dev/networking/test/types -# knative.dev/pkg v0.0.0-20210330073320-3b7934e599fb +# knative.dev/pkg v0.0.0-20210330162221-808d62257db6 ## explicit knative.dev/pkg/apis knative.dev/pkg/apis/duck