Skip to content

Commit 35735bb

Browse files
zeripath6543
andauthored
Upgrade to golang-jwt 3.2.2 (#16590)
* Upgrade to golang-jwt 3.2.2 Upgrade to the latest version of golang-jwt Signed-off-by: Andrew Thornton <art27@cantab.net> * Forcibly replace the 3.2.1 version of golang-jwt/jwt and increase minimum Go version Using go.mod we can forcibly replace the 3.2.1 version used by goth to 3.2.2. Further given golang-jwt/jwts stated policy of only supporting supported go versions we should just raise our minimal version of go to 1.16 for 1.16 as by time of release 1.15 will be out of support. Signed-off-by: Andrew Thornton <art27@cantab.net> * update minimal go required Signed-off-by: Andrew Thornton <art27@cantab.net> * update config.yaml Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: 6543 <6543@obermui.de>
1 parent 80b7889 commit 35735bb

14 files changed

+203
-52
lines changed

.drone.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ steps:
8484

8585
- name: build-backend-no-gcc
8686
pull: always
87-
image: golang:1.14 # this step is kept as the lowest version of golang that we support
87+
image: golang:1.16 # this step is kept as the lowest version of golang that we support
8888
environment:
8989
GO111MODULE: on
9090
GOPROXY: off

Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ HAS_GO = $(shell hash $(GO) > /dev/null 2>&1 && echo "GO" || echo "NOGO" )
2525
COMMA := ,
2626

2727
XGO_VERSION := go-1.16.x
28-
MIN_GO_VERSION := 001014000
28+
MIN_GO_VERSION := 001016000
2929
MIN_NODE_VERSION := 012017000
3030

3131
DOCKER_IMAGE ?= gitea/gitea
@@ -200,7 +200,7 @@ help:
200200
go-check:
201201
$(eval GO_VERSION := $(shell printf "%03d%03d%03d" $(shell $(GO) version | grep -Eo '[0-9]+\.[0-9.]+' | tr '.' ' ');))
202202
@if [ "$(GO_VERSION)" -lt "$(MIN_GO_VERSION)" ]; then \
203-
echo "Gitea requires Go 1.14 or greater to build. You can get it at https://golang.org/dl/"; \
203+
echo "Gitea requires Go 1.16 or greater to build. You can get it at https://golang.org/dl/"; \
204204
exit 1; \
205205
fi
206206

docs/config.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ params:
1919
author: The Gitea Authors
2020
website: https://docs.gitea.io
2121
version: 1.14.5
22-
minGoVersion: 1.14
22+
minGoVersion: 1.16
2323
goVersion: 1.16
2424
minNodeVersion: 12.17
2525

go.mod

+3-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ require (
5050
github.com/gogs/chardet v0.0.0-20191104214054-4b6791f73a28
5151
github.com/gogs/cron v0.0.0-20171120032916-9f6c956d3e14
5252
github.com/gogs/go-gogs-client v0.0.0-20210131175652-1d7215cd8d85
53-
github.com/golang-jwt/jwt v3.2.1+incompatible
53+
github.com/golang-jwt/jwt v3.2.2+incompatible
5454
github.com/golang/snappy v0.0.4 // indirect
5555
github.com/google/go-github/v32 v32.1.0
5656
github.com/google/go-querystring v1.1.0 // indirect
@@ -143,3 +143,5 @@ require (
143143
)
144144

145145
replace github.com/hashicorp/go-version => github.com/6543/go-version v1.3.1
146+
147+
replace github.com/golang-jwt/jwt v3.2.1+incompatible => github.com/golang-jwt/jwt v3.2.2+incompatible

go.sum

+2-4
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,6 @@ gitea.com/go-chi/captcha v0.0.0-20210110083842-e7696c336a1e h1:YjaQU6XFicdhPN+Ml
4949
gitea.com/go-chi/captcha v0.0.0-20210110083842-e7696c336a1e/go.mod h1:nfA7JaGv3hbGQ1ktdhAsZhdS84qKffI8NMlHr+Opsog=
5050
gitea.com/go-chi/session v0.0.0-20210108030337-0cb48c5ba8ee h1:9U6HuKUBt/cGK6T/64dEuz0r7Yp97WAAEJvXHDlY3ws=
5151
gitea.com/go-chi/session v0.0.0-20210108030337-0cb48c5ba8ee/go.mod h1:Ozg8IchVNb/Udg+ui39iHRYqVHSvf3C99ixdpLR8Vu0=
52-
gitea.com/lunny/levelqueue v0.3.0 h1:MHn1GuSZkxvVEDMyAPqlc7A3cOW+q8RcGhRgH/xtm6I=
53-
gitea.com/lunny/levelqueue v0.3.0/go.mod h1:HBqmLbz56JWpfEGG0prskAV97ATNRoj5LDmPicD22hU=
5452
gitea.com/lunny/levelqueue v0.4.0 h1:v+bCR1lwLTBpZMshguWNhGIFLkUj+R04pgaU3TcJFS8=
5553
gitea.com/lunny/levelqueue v0.4.0/go.mod h1:HBqmLbz56JWpfEGG0prskAV97ATNRoj5LDmPicD22hU=
5654
gitea.com/xorm/sqlfiddle v0.0.0-20180821085327-62ce714f951a h1:lSA0F4e9A2NcQSqGqTOXqu2aRi/XEQxDCBwM8yJtE6s=
@@ -477,8 +475,8 @@ github.com/gogs/cron v0.0.0-20171120032916-9f6c956d3e14 h1:yXtpJr/LV6PFu4nTLgfjQ
477475
github.com/gogs/cron v0.0.0-20171120032916-9f6c956d3e14/go.mod h1:jPoNZLWDAqA5N3G5amEoiNbhVrmM+ZQEcnQvNQ2KaZk=
478476
github.com/gogs/go-gogs-client v0.0.0-20210131175652-1d7215cd8d85 h1:UjoPNDAQ5JPCjlxoJd6K8ALZqSDDhk2ymieAZOVaDg0=
479477
github.com/gogs/go-gogs-client v0.0.0-20210131175652-1d7215cd8d85/go.mod h1:fR6z1Ie6rtF7kl/vBYMfgD5/G5B1blui7z426/sj2DU=
480-
github.com/golang-jwt/jwt v3.2.1+incompatible h1:73Z+4BJcrTC+KczS6WvTPvRGOp1WmfEP4Q1lOd9Z/+c=
481-
github.com/golang-jwt/jwt v3.2.1+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I=
478+
github.com/golang-jwt/jwt v3.2.2+incompatible h1:IfV12K8xAKAnZqdXVzCZ+TOjboZ2keLg81eXfW3O+oY=
479+
github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I=
482480
github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe h1:lXe2qZdvpiX5WZkZR4hgp4KJVfY3nMkvmwbVkpv1rVY=
483481
github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0=
484482
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=

vendor/github.com/golang-jwt/jwt/.travis.yml

-11
This file was deleted.

vendor/github.com/golang-jwt/jwt/README.md

+8-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/golang-jwt/jwt/VERSION_HISTORY.md

+7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/golang-jwt/jwt/ecdsa.go

+6-12
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/golang-jwt/jwt/ed25519.go

+81
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/golang-jwt/jwt/ed25519_utils.go

+64
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/golang-jwt/jwt/map_claims.go

+24-12
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/golang-jwt/jwt/token.go

+2-6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/modules.txt

+2-1
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,7 @@ github.com/gogs/cron
428428
# github.com/gogs/go-gogs-client v0.0.0-20210131175652-1d7215cd8d85
429429
## explicit
430430
github.com/gogs/go-gogs-client
431-
# github.com/golang-jwt/jwt v3.2.1+incompatible
431+
# github.com/golang-jwt/jwt v3.2.2+incompatible
432432
## explicit
433433
github.com/golang-jwt/jwt
434434
# github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe
@@ -1053,3 +1053,4 @@ xorm.io/xorm/names
10531053
xorm.io/xorm/schemas
10541054
xorm.io/xorm/tags
10551055
# github.com/hashicorp/go-version => github.com/6543/go-version v1.3.1
1056+
# github.com/golang-jwt/jwt v3.2.1+incompatible => github.com/golang-jwt/jwt v3.2.2+incompatible

0 commit comments

Comments
 (0)