summaryrefslogtreecommitdiffstats
path: root/routers/install.go
diff options
context:
space:
mode:
authorzeripath <art27@cantab.net>2020-05-17 13:43:29 +0100
committerGitHub <noreply@github.com>2020-05-17 15:43:29 +0300
commit76053ac31afccefc0335977a131089e696b46eab (patch)
tree19dfbe34ecf450c7e33e45355e098ca87d8f24cb /routers/install.go
parent50932ce8afb7e3bbae7be9ed854ba13c8002139a (diff)
downloadgitea-76053ac31afccefc0335977a131089e696b46eab.tar.gz
gitea-76053ac31afccefc0335977a131089e696b46eab.zip
Whenever the ctx.Session is updated, release it to save it before sending the redirect (#11456)
Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: Lauris BH <lauris@nix.lv>
Diffstat (limited to 'routers/install.go')
-rw-r--r--routers/install.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/routers/install.go b/routers/install.go
index e18adfea15..d4f270c9c3 100644
--- a/routers/install.go
+++ b/routers/install.go
@@ -387,6 +387,11 @@ func InstallPost(ctx *context.Context, form auth.InstallForm) {
ctx.RenderWithErr(ctx.Tr("install.save_config_failed", err), tplInstall, &form)
return
}
+
+ if err = ctx.Session.Release(); err != nil {
+ ctx.RenderWithErr(ctx.Tr("install.save_config_failed", err), tplInstall, &form)
+ return
+ }
}
log.Info("First-time run install finished!")