Browse Source

user/auth: fix page not redirect after login

pull/4839/head
Unknwon 7 years ago
parent
commit
4258bf3d54
No known key found for this signature in database
GPG Key ID: 25B575AE3213B2B3
  1. 2
      gogs.go
  2. 2
      routes/user/auth.go
  3. 2
      templates/.VERSION

2
gogs.go

@ -16,7 +16,7 @@ import (
"github.com/gogits/gogs/pkg/setting" "github.com/gogits/gogs/pkg/setting"
) )
const APP_VER = "0.11.30.1014" const APP_VER = "0.11.31.1022"
func init() { func init() {
setting.AppVer = APP_VER setting.AppVer = APP_VER

2
routes/user/auth.go

@ -95,7 +95,6 @@ func Login(c *context.Context) {
} else { } else {
redirectTo, _ = url.QueryUnescape(c.GetCookie("redirect_to")) redirectTo, _ = url.QueryUnescape(c.GetCookie("redirect_to"))
} }
c.SetCookie("redirect_to", "", -1, setting.AppSubURL)
if isSucceed { if isSucceed {
if isValidRedirect(redirectTo) { if isValidRedirect(redirectTo) {
@ -103,6 +102,7 @@ func Login(c *context.Context) {
} else { } else {
c.Redirect(setting.AppSubURL + "/") c.Redirect(setting.AppSubURL + "/")
} }
c.SetCookie("redirect_to", "", -1, setting.AppSubURL)
return return
} }

2
templates/.VERSION

@ -1 +1 @@
0.11.30.1014 0.11.31.1022
Loading…
Cancel
Save