Skip to content

Commit 7c26c7d

Browse files
authored
Fix jwt-go security vulnerability (#1393)
/cherry-pick Signed-off-by: 1gtm <1gtm@appscode.com>
1 parent 8f63f72 commit 7c26c7d

File tree

4 files changed

+57
-31
lines changed

4 files changed

+57
-31
lines changed

go.mod

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,4 +154,8 @@ replace sigs.k8s.io/application => github.com/kmodules/application v0.8.4-0.2021
154154

155155
replace github.com/satori/go.uuid => github.com/gofrs/uuid v4.0.0+incompatible
156156

157-
replace github.com/dgrijalva/jwt-go => github.com/golang-jwt/jwt v3.2.1+incompatible
157+
replace github.com/dgrijalva/jwt-go => github.com/gomodules/jwt v3.2.2+incompatible
158+
159+
replace github.com/golang-jwt/jwt => github.com/golang-jwt/jwt v3.2.2+incompatible
160+
161+
replace github.com/form3tech-oss/jwt-go => github.com/form3tech-oss/jwt-go v3.2.5+incompatible

go.sum

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -234,8 +234,8 @@ github.com/fatih/structs v1.1.0 h1:Q7juDM0QtcnhCpeyLGQKyg4TOIghuNXrkL32pHAUMxo=
234234
github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M=
235235
github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc=
236236
github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k=
237-
github.com/form3tech-oss/jwt-go v3.2.2+incompatible h1:TcekIExNqud5crz4xD2pavyTgWiPvpYe4Xau31I0PRk=
238-
github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k=
237+
github.com/form3tech-oss/jwt-go v3.2.5+incompatible h1:/l4kBbb4/vGSsdtB5nUe8L7B9mImVMaBPw9L/0TBHU8=
238+
github.com/form3tech-oss/jwt-go v3.2.5+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k=
239239
github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g=
240240
github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4=
241241
github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20=
@@ -292,8 +292,6 @@ github.com/gofrs/uuid v4.0.0+incompatible h1:1SD/1F5pU8p29ybwgQSwpQk+mwdRrXCYuPh
292292
github.com/gofrs/uuid v4.0.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM=
293293
github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q=
294294
github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=
295-
github.com/golang-jwt/jwt v3.2.1+incompatible h1:73Z+4BJcrTC+KczS6WvTPvRGOp1WmfEP4Q1lOd9Z/+c=
296-
github.com/golang-jwt/jwt v3.2.1+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I=
297295
github.com/golang-jwt/jwt v3.2.2+incompatible h1:IfV12K8xAKAnZqdXVzCZ+TOjboZ2keLg81eXfW3O+oY=
298296
github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I=
299297
github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k=
@@ -312,6 +310,8 @@ github.com/golang/protobuf v1.4.3 h1:JjCZWpVbqXDqFVmTfYWEVTMIYrL/NPdPSCHPJ0T/raM
312310
github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
313311
github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
314312
github.com/golangplus/testing v0.0.0-20180327235837-af21d9c3145e/go.mod h1:0AA//k/eakGydO4jKRoRL2j92ZKSzTgj9tclaCrvXHk=
313+
github.com/gomodules/jwt v3.2.2+incompatible h1:tEQKHcGKfDKsHLf5VmQvKf3YTmQPNt9GP5b4YF2jyDs=
314+
github.com/gomodules/jwt v3.2.2+incompatible/go.mod h1:cOm5eKP+RVgQveNVZfQ7ZEc5KPmk2F2i/JNDKlkzzDQ=
315315
github.com/gomodules/validate v0.19.8-1.16/go.mod h1:8DJv2CVJQ6kGNpFW6eV9N3JviE1C85nY1c2z52x1Gk4=
316316
github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
317317
github.com/google/btree v1.0.0 h1:0udJVsspx3VBr5FwtLhQQtuAsVc79tTq0ocGIPAU6qo=

vendor/github.com/form3tech-oss/jwt-go/map_claims.go

Lines changed: 43 additions & 23 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/modules.txt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ github.com/emicklei/go-restful/log
125125
github.com/evanphx/json-patch
126126
# github.com/fatih/structs v1.1.0
127127
github.com/fatih/structs
128-
# github.com/form3tech-oss/jwt-go v3.2.2+incompatible
128+
# github.com/form3tech-oss/jwt-go v3.2.2+incompatible => github.com/form3tech-oss/jwt-go v3.2.5+incompatible
129129
github.com/form3tech-oss/jwt-go
130130
# github.com/fsnotify/fsnotify v1.4.9
131131
github.com/fsnotify/fsnotify
@@ -153,7 +153,7 @@ github.com/gogo/protobuf/gogoproto
153153
github.com/gogo/protobuf/proto
154154
github.com/gogo/protobuf/protoc-gen-gogo/descriptor
155155
github.com/gogo/protobuf/sortkeys
156-
# github.com/golang-jwt/jwt v3.2.2+incompatible
156+
# github.com/golang-jwt/jwt v3.2.2+incompatible => github.com/golang-jwt/jwt v3.2.2+incompatible
157157
## explicit
158158
# github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e
159159
github.com/golang/groupcache/lru
@@ -1568,4 +1568,6 @@ stash.appscode.dev/apimachinery/pkg/util
15681568
# k8s.io/utils => k8s.io/utils v0.0.0-20201110183641-67b214c5f920
15691569
# sigs.k8s.io/application => github.com/kmodules/application v0.8.4-0.20210427030912-90eeee3bc4ad
15701570
# github.com/satori/go.uuid => github.com/gofrs/uuid v4.0.0+incompatible
1571-
# github.com/dgrijalva/jwt-go => github.com/golang-jwt/jwt v3.2.1+incompatible
1571+
# github.com/dgrijalva/jwt-go => github.com/gomodules/jwt v3.2.2+incompatible
1572+
# github.com/golang-jwt/jwt => github.com/golang-jwt/jwt v3.2.2+incompatible
1573+
# github.com/form3tech-oss/jwt-go => github.com/form3tech-oss/jwt-go v3.2.5+incompatible

0 commit comments

Comments
 (0)