Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-pages.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--go.mod2
-rw-r--r--go.sum4
-rw-r--r--internal/auth/auth_code.go2
-rw-r--r--internal/auth/auth_code_test.go8
-rw-r--r--internal/source/gitlab/client/client.go2
-rw-r--r--internal/source/gitlab/client/client_test.go2
6 files changed, 11 insertions, 9 deletions
diff --git a/go.mod b/go.mod
index d5bfd5c3..ef2c7cb6 100644
--- a/go.mod
+++ b/go.mod
@@ -8,7 +8,7 @@ module gitlab.com/gitlab-org/gitlab-pages
go 1.18
require (
- github.com/golang-jwt/jwt/v4 v4.5.0
+ github.com/golang-jwt/jwt/v5 v5.0.0
github.com/golang/mock v1.6.0
github.com/gorilla/handlers v1.5.1
github.com/gorilla/mux v1.8.0
diff --git a/go.sum b/go.sum
index 54cf8d4d..b59cff81 100644
--- a/go.sum
+++ b/go.sum
@@ -86,8 +86,8 @@ github.com/go-errors/errors v1.0.1 h1:LUHzmkK3GUKUrL/1gfBUxAHzcev3apQlezX/+O7ma6
github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
-github.com/golang-jwt/jwt/v4 v4.5.0 h1:7cYmW1XlMY7h7ii7UhUyChSgS5wUJEnm9uZVTGqOWzg=
-github.com/golang-jwt/jwt/v4 v4.5.0/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0=
+github.com/golang-jwt/jwt/v5 v5.0.0 h1:1n1XNM9hk7O9mnQoNBGolZvzebBQ7p93ULHRc28XJUE=
+github.com/golang-jwt/jwt/v5 v5.0.0/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk=
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
diff --git a/internal/auth/auth_code.go b/internal/auth/auth_code.go
index ffbd5734..f53aec9d 100644
--- a/internal/auth/auth_code.go
+++ b/internal/auth/auth_code.go
@@ -10,7 +10,7 @@ import (
"fmt"
"io"
- "github.com/golang-jwt/jwt/v4"
+ "github.com/golang-jwt/jwt/v5"
"github.com/gorilla/securecookie"
"golang.org/x/crypto/hkdf"
)
diff --git a/internal/auth/auth_code_test.go b/internal/auth/auth_code_test.go
index 5a496066..cdff4c35 100644
--- a/internal/auth/auth_code_test.go
+++ b/internal/auth/auth_code_test.go
@@ -56,7 +56,7 @@ func TestEncryptAndDecryptSignedCode(t *testing.T) {
encDomain: "domain",
code: "code",
decDomain: "domain",
- expectedDecErrMsg: "Token is expired",
+ expectedDecErrMsg: "token is expired",
},
}
@@ -74,7 +74,8 @@ func TestEncryptAndDecryptSignedCode(t *testing.T) {
decCode, err := test.auth.DecryptCode(encCode, test.decDomain)
if test.expectedDecErrMsg != "" {
- require.EqualError(t, err, test.expectedDecErrMsg)
+ require.Error(t, err)
+ require.Contains(t, err.Error(), test.expectedDecErrMsg)
require.Empty(t, decCode)
return
}
@@ -94,6 +95,7 @@ func TestDecryptCodeWithInvalidJWT(t *testing.T) {
require.NoError(t, err)
decCode, err := auth2.DecryptCode(encCode, "domain")
- require.EqualError(t, err, "signature is invalid")
+ require.Error(t, err)
+ require.Contains(t, err.Error(), "signature is invalid")
require.Empty(t, decCode)
}
diff --git a/internal/source/gitlab/client/client.go b/internal/source/gitlab/client/client.go
index 4b6ea98d..a876c734 100644
--- a/internal/source/gitlab/client/client.go
+++ b/internal/source/gitlab/client/client.go
@@ -10,7 +10,7 @@ import (
"path"
"time"
- "github.com/golang-jwt/jwt/v4"
+ "github.com/golang-jwt/jwt/v5"
"gitlab.com/gitlab-org/labkit/correlation"
"gitlab.com/gitlab-org/labkit/log"
diff --git a/internal/source/gitlab/client/client_test.go b/internal/source/gitlab/client/client_test.go
index 1a6572db..ca7b21fb 100644
--- a/internal/source/gitlab/client/client_test.go
+++ b/internal/source/gitlab/client/client_test.go
@@ -11,7 +11,7 @@ import (
"testing"
"time"
- "github.com/golang-jwt/jwt/v4"
+ "github.com/golang-jwt/jwt/v5"
"github.com/stretchr/testify/require"
"gitlab.com/gitlab-org/gitlab-pages/internal/domain"