diff options
author | wxiaoguang <wxiaoguang@gmail.com> | 2023-08-14 18:30:16 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-14 10:30:16 +0000 |
commit | ed1be4ca68daa9782ea65135110799a4bf0697f8 (patch) | |
tree | 29d3465f32643df3e3d7f76e56e3dad4afb56b75 /routers/install/install.go | |
parent | cafce3b4b5afb3f254a48e87f1516d7b5dc209b6 (diff) | |
download | gitea-ed1be4ca68daa9782ea65135110799a4bf0697f8.tar.gz gitea-ed1be4ca68daa9782ea65135110799a4bf0697f8.zip |
Handle base64 decoding correctly to avoid panic (#26483)
Fix the panic if the "base64 secret" is too long.
Diffstat (limited to 'routers/install/install.go')
-rw-r--r-- | routers/install/install.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/routers/install/install.go b/routers/install/install.go index aa9c0f4986..99ea7b0738 100644 --- a/routers/install/install.go +++ b/routers/install/install.go @@ -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 } |