diff --git a/go.mod b/go.mod index 9967ef594..92ab90e01 100644 --- a/go.mod +++ b/go.mod @@ -23,7 +23,6 @@ require ( github.com/gin-gonic/gin v1.9.1 github.com/go-ap/httpsig v0.0.0-20221203064646-3647b4d88fdf github.com/go-sql-driver/mysql v1.7.1 - github.com/golang-jwt/jwt/v4 v4.5.0 github.com/golang-jwt/jwt/v5 v5.0.0 github.com/google/go-github/v39 v39.2.0 github.com/google/tink/go v1.7.0 diff --git a/go.sum b/go.sum index bf8ecd4a6..b0203af18 100644 --- a/go.sum +++ b/go.sum @@ -157,6 +157,7 @@ github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= 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-sql/civil v0.0.0-20190719163853-cb61b32ac6fe/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0= github.com/golang-sql/sqlexp v0.1.0/go.mod h1:J4ad9Vo8ZCWQ2GMrC4UCQy1JpCbwU9m3EOqtpKwwwHI= diff --git a/server/grpc/jwt_manager.go b/server/grpc/jwt_manager.go index 100a70ea9..1218f1822 100644 --- a/server/grpc/jwt_manager.go +++ b/server/grpc/jwt_manager.go @@ -19,7 +19,7 @@ import ( "fmt" "time" - "github.com/golang-jwt/jwt/v4" + "github.com/golang-jwt/jwt/v5" ) // JWTManager is a JSON web token manager diff --git a/shared/token/token.go b/shared/token/token.go index 3f1553718..f00e7b047 100644 --- a/shared/token/token.go +++ b/shared/token/token.go @@ -18,7 +18,7 @@ import ( "fmt" "net/http" - "github.com/golang-jwt/jwt/v4" + "github.com/golang-jwt/jwt/v5" "github.com/rs/zerolog/log" ) @@ -46,7 +46,7 @@ func parse(raw string, fn SecretFunc) (*Token, error) { if err != nil { return nil, err } else if !parsed.Valid { - return nil, jwt.ValidationError{} + return nil, jwt.ErrTokenUnverifiable } return token, nil } @@ -141,7 +141,7 @@ func keyFunc(token *Token, fn SecretFunc) jwt.Keyfunc { // the expected type. kindv, ok := claims["type"] if !ok { - return nil, jwt.ValidationError{} + return nil, jwt.ErrInvalidType } token.Kind, _ = kindv.(string) @@ -149,7 +149,7 @@ func keyFunc(token *Token, fn SecretFunc) jwt.Keyfunc { // expected type. textv, ok := claims["text"] if !ok { - return nil, jwt.ValidationError{} + return nil, jwt.ErrInvalidType } token.Text, _ = textv.(string) diff --git a/web/components.d.ts b/web/components.d.ts index 050a8c050..3120ee4a2 100644 --- a/web/components.d.ts +++ b/web/components.d.ts @@ -3,11 +3,9 @@ // @ts-nocheck // Generated by unplugin-vue-components // Read more: https://github.com/vuejs/core/pull/3399 -import '@vue/runtime-core' - export {} -declare module '@vue/runtime-core' { +declare module 'vue' { export interface GlobalComponents { ActionsTab: typeof import('./src/components/repo/settings/ActionsTab.vue')['default'] ActivePipelines: typeof import('./src/components/layout/header/ActivePipelines.vue')['default']