aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2017-10-22 19:29:17 -0400
committerUnknwon <u@gogs.io>2017-10-22 19:29:17 -0400
commit4258bf3d54be12a290cf35b1e28de1d0dac8e78e (patch)
tree07249776be78e27ecf9cf044346b16dc13b959d0
parent4d1d66d906321e5bdcc6b22a8fe054bd95723f36 (diff)
user/auth: fix page not redirect after login
-rw-r--r--gogs.go2
-rw-r--r--routes/user/auth.go2
-rw-r--r--templates/.VERSION2
3 files changed, 3 insertions, 3 deletions
diff --git a/gogs.go b/gogs.go
index 0880650d..b886bb7d 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 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