diff options
author | Unknwon <u@gogs.io> | 2016-03-04 09:15:11 -0500 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2016-03-04 09:15:11 -0500 |
commit | f6759a731a063d5d2be8a932f8d1e1a784cc0528 (patch) | |
tree | 47c9ac0ce3401bdb9f4a136c5a6c4f17301f0c66 | |
parent | dfbda48afc805095693ffa21925aea95efc8e5ff (diff) | |
download | gitea-f6759a731a063d5d2be8a932f8d1e1a784cc0528.tar.gz gitea-f6759a731a063d5d2be8a932f8d1e1a784cc0528.zip |
#2748 fix redirect loop with auto-signin
-rw-r--r-- | README.md | 2 | ||||
-rw-r--r-- | gogs.go | 2 | ||||
-rw-r--r-- | modules/middleware/auth.go | 3 | ||||
-rw-r--r-- | templates/.VERSION | 2 |
4 files changed, 5 insertions, 4 deletions
@@ -3,7 +3,7 @@ Gogs - Go Git Service [![Build Status](https://travis-ci.org/gogits/gogs.svg?bra ![](https://github.com/gogits/gogs/blob/master/public/img/gogs-large-resize.png?raw=true) -##### Current version: 0.8.53 +##### Current version: 0.8.54 | Web | UI | Preview | |:-------------:|:-------:|:-------:| @@ -17,7 +17,7 @@ import ( "github.com/gogits/gogs/modules/setting" ) -const APP_VER = "0.8.53.0303" +const APP_VER = "0.8.54.0304" func init() { runtime.GOMAXPROCS(runtime.NumCPU()) diff --git a/modules/middleware/auth.go b/modules/middleware/auth.go index e7460fc6dd..4e549a0782 100644 --- a/modules/middleware/auth.go +++ b/modules/middleware/auth.go @@ -113,7 +113,8 @@ func Toggle(options *ToggleOptions) macaron.Handler { if !options.SignOutRequire && !ctx.IsSigned && !auth.IsAPIPath(ctx.Req.URL.Path) && len(ctx.GetCookie(setting.CookieUserName)) > 0 { ctx.SetCookie("redirect_to", url.QueryEscape(setting.AppSubUrl+ctx.Req.RequestURI), 0, setting.AppSubUrl) - ctx.Redirect(setting.AppSubUrl + ctx.Req.RequestURI) + ctx.Redirect(setting.AppSubUrl + "/user/login") + return } if options.AdminRequire { diff --git a/templates/.VERSION b/templates/.VERSION index 07a96ab49f..fa5080398f 100644 --- a/templates/.VERSION +++ b/templates/.VERSION @@ -1 +1 @@ -0.8.53.0303
\ No newline at end of file +0.8.54.0304
\ No newline at end of file |