Skip to content

Commit f6759a7

Browse files
committed
#2748 fix redirect loop with auto-signin
1 parent dfbda48 commit f6759a7

File tree

4 files changed

+5
-4
lines changed

4 files changed

+5
-4
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Gogs - Go Git Service [![Build Status](https://travis-ci.org/gogits/gogs.svg?bra
33

44
![](https://github.com/gogits/gogs/blob/master/public/img/gogs-large-resize.png?raw=true)
55

6-
##### Current version: 0.8.53
6+
##### Current version: 0.8.54
77

88
| Web | UI | Preview |
99
|:-------------:|:-------:|:-------:|

gogs.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import (
1717
"github.com/gogits/gogs/modules/setting"
1818
)
1919

20-
const APP_VER = "0.8.53.0303"
20+
const APP_VER = "0.8.54.0304"
2121

2222
func init() {
2323
runtime.GOMAXPROCS(runtime.NumCPU())

modules/middleware/auth.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,8 @@ func Toggle(options *ToggleOptions) macaron.Handler {
113113
if !options.SignOutRequire && !ctx.IsSigned && !auth.IsAPIPath(ctx.Req.URL.Path) &&
114114
len(ctx.GetCookie(setting.CookieUserName)) > 0 {
115115
ctx.SetCookie("redirect_to", url.QueryEscape(setting.AppSubUrl+ctx.Req.RequestURI), 0, setting.AppSubUrl)
116-
ctx.Redirect(setting.AppSubUrl + ctx.Req.RequestURI)
116+
ctx.Redirect(setting.AppSubUrl + "/user/login")
117+
return
117118
}
118119

119120
if options.AdminRequire {

templates/.VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.8.53.0303
1+
0.8.54.0304

0 commit comments

Comments
 (0)