Refactor JWT secret generating & decoding code (#29172)
Old code is not consistent for generating & decoding the JWT secrets. Now, the callers only need to use 2 consistent functions: NewJwtSecretWithBase64 and DecodeJwtSecretBase64 And remove a non-common function Base64FixedDecode from util.go
This commit is contained in:
@ -409,7 +409,7 @@ func SubmitInstall(ctx *context.Context) {
|
||||
cfg.Section("server").Key("LFS_START_SERVER").SetValue("true")
|
||||
cfg.Section("lfs").Key("PATH").SetValue(form.LFSRootPath)
|
||||
var lfsJwtSecret string
|
||||
if _, lfsJwtSecret, err = generate.NewJwtSecretBase64(); err != nil {
|
||||
if _, lfsJwtSecret, err = generate.NewJwtSecretWithBase64(); err != nil {
|
||||
ctx.RenderWithErr(ctx.Tr("install.lfs_jwt_secret_failed", err), tplInstall, &form)
|
||||
return
|
||||
}
|
||||
|
Reference in New Issue
Block a user