diff options
author | Unknwon <u@gogs.io> | 2017-10-22 19:29:17 -0400 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2017-10-22 19:29:17 -0400 |
commit | 4258bf3d54be12a290cf35b1e28de1d0dac8e78e (patch) | |
tree | 07249776be78e27ecf9cf044346b16dc13b959d0 | |
parent | 4d1d66d906321e5bdcc6b22a8fe054bd95723f36 (diff) |
user/auth: fix page not redirect after login
-rw-r--r-- | gogs.go | 2 | ||||
-rw-r--r-- | routes/user/auth.go | 2 | ||||
-rw-r--r-- | templates/.VERSION | 2 |
3 files changed, 3 insertions, 3 deletions
@@ -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 34fdbd85..b145fb1f 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 382fe183..db402082 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 |