mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-25 11:22:16 +00:00
Handle base64 decoding correctly to avoid panic (#26483)
Fix the panic if the "base64 secret" is too long.
This commit is contained in:
parent
cafce3b4b5
commit
ed1be4ca68
8 changed files with 43 additions and 30 deletions
|
@ -415,7 +415,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.NewJwtSecretBase64(); err != nil {
|
||||
ctx.RenderWithErr(ctx.Tr("install.lfs_jwt_secret_failed", err), tplInstall, &form)
|
||||
return
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue