Skip to content
Permalink
Browse files Browse the repository at this point in the history
🐛Fix login security issues
  • Loading branch information
libsgh committed Mar 13, 2023
1 parent b30a743 commit f7ec0c5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion control/middleware/jwt.go
Expand Up @@ -20,7 +20,7 @@ const (
func JWTMiddlewar() (*jwt.GinJWTMiddleware, error) {
authMiddleware, err := jwt.New(&jwt.GinJWTMiddleware{
Realm: "PanIndex Zone",
Key: []byte("PanIndex"),
Key: []byte(module.GloablConfig.JwtSignKey),
Timeout: (time.Duration(LoginTimeOut)) * time.Hour,
MaxRefresh: (time.Duration(LoginTimeOut)) * time.Hour,
IdentityKey: identityKey,
Expand Down
1 change: 1 addition & 0 deletions dao/db.go
Expand Up @@ -73,6 +73,7 @@ var InitConfigItems = []module.ConfigItem{
{"dav_user", "webdav", "dav"},
{"dav_password", "1234", "dav"},
{"proxy", "", "common"},
{"jwt_sign_key", uuid.NewV4().String(), "common"},
}

type Db interface {
Expand Down

0 comments on commit f7ec0c5

Please sign in to comment.