From 4258bf3d54be12a290cf35b1e28de1d0dac8e78e Mon Sep 17 00:00:00 2001 From: Unknwon Date: Sun, 22 Oct 2017 19:29:17 -0400 Subject: [PATCH] user/auth: fix page not redirect after login --- gogs.go | 2 +- routes/user/auth.go | 2 +- templates/.VERSION | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gogs.go b/gogs.go index 0880650d7..b886bb7d1 100644 --- a/gogs.go +++ b/gogs.go @@ -16,7 +16,7 @@ import ( "github.com/gogits/gogs/pkg/setting" ) -const APP_VER = "0.11.30.1014" +const APP_VER = "0.11.31.1022" func init() { setting.AppVer = APP_VER diff --git a/routes/user/auth.go b/routes/user/auth.go index 34fdbd858..b145fb1f4 100644 --- a/routes/user/auth.go +++ b/routes/user/auth.go @@ -95,7 +95,6 @@ func Login(c *context.Context) { } else { redirectTo, _ = url.QueryUnescape(c.GetCookie("redirect_to")) } - c.SetCookie("redirect_to", "", -1, setting.AppSubURL) if isSucceed { if isValidRedirect(redirectTo) { @@ -103,6 +102,7 @@ func Login(c *context.Context) { } else { c.Redirect(setting.AppSubURL + "/") } + c.SetCookie("redirect_to", "", -1, setting.AppSubURL) return } diff --git a/templates/.VERSION b/templates/.VERSION index 382fe183b..db4020828 100644 --- a/templates/.VERSION +++ b/templates/.VERSION @@ -1 +1 @@ -0.11.30.1014 \ No newline at end of file +0.11.31.1022 \ No newline at end of file