1
0
mirror of https://github.com/haiwen/seafile-server.git synced 2025-09-16 23:29:25 +00:00

Fix security issue and add go linter (#677)

* Fix security issue and add go linter

* Fix error checked by golangci-lint

* Delete jwt-go pkg

---------

Co-authored-by: 杨赫然 <heran.yang@seafile.com>
This commit is contained in:
feiniks
2024-08-12 14:59:45 +08:00
committed by GitHub
parent 026a6d504f
commit 738716496a
19 changed files with 134 additions and 78 deletions

View File

@@ -6,7 +6,7 @@ import (
"runtime/debug"
"time"
"github.com/dgrijalva/jwt-go"
jwt "github.com/golang-jwt/jwt/v5"
"github.com/gorilla/websocket"
log "github.com/sirupsen/logrus"
)
@@ -43,6 +43,7 @@ type myClaims struct {
Exp int64
RepoID string `json:"repo_id"`
UserName string `json:"username"`
jwt.RegisteredClaims
}
func (*myClaims) Valid() error {