]> source.dussan.org Git - gitea.git/commitdiff
#2748 fix redirect loop with auto-signin
authorUnknwon <u@gogs.io>
Fri, 4 Mar 2016 14:15:11 +0000 (09:15 -0500)
committerUnknwon <u@gogs.io>
Fri, 4 Mar 2016 14:15:11 +0000 (09:15 -0500)
README.md
gogs.go
modules/middleware/auth.go
templates/.VERSION

index a291d8c7bb95e0e1d187db1e2f7eb943f175a469..895217d35b562343b42dfc08c2ba8a7c82582805 100644 (file)
--- a/README.md
+++ b/README.md
@@ -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  |
 |:-------------:|:-------:|:-------:|
diff --git a/gogs.go b/gogs.go
index 86adb081acd2c5199c8ad77ff1cd5ef68d1d6ffc..3f7f4f4b5520ce44752eee80a2c4fd12ac6c59e5 100644 (file)
--- a/gogs.go
+++ b/gogs.go
@@ -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())
index e7460fc6dde22cae103e8af9cc4e3589dfee4bbb..4e549a078252f1ea21856fede5e74f60f8c7a94f 100644 (file)
@@ -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 {
index 07a96ab49f128d5b67d5a58e2b8fc10a89bb51b0..fa5080398fdcb43dd36167f5163f868edb4e1962 100644 (file)
@@ -1 +1 @@
-0.8.53.0303
\ No newline at end of file
+0.8.54.0304
\ No newline at end of file