|
|
@ -17,6 +17,7 @@ import ( |
|
|
|
"code.gitea.io/gitea/modules/auth/password" |
|
|
|
"code.gitea.io/gitea/modules/auth/password" |
|
|
|
"code.gitea.io/gitea/modules/base" |
|
|
|
"code.gitea.io/gitea/modules/base" |
|
|
|
"code.gitea.io/gitea/modules/eventsource" |
|
|
|
"code.gitea.io/gitea/modules/eventsource" |
|
|
|
|
|
|
|
"code.gitea.io/gitea/modules/httplib" |
|
|
|
"code.gitea.io/gitea/modules/log" |
|
|
|
"code.gitea.io/gitea/modules/log" |
|
|
|
"code.gitea.io/gitea/modules/optional" |
|
|
|
"code.gitea.io/gitea/modules/optional" |
|
|
|
"code.gitea.io/gitea/modules/session" |
|
|
|
"code.gitea.io/gitea/modules/session" |
|
|
@ -25,7 +26,6 @@ import ( |
|
|
|
"code.gitea.io/gitea/modules/util" |
|
|
|
"code.gitea.io/gitea/modules/util" |
|
|
|
"code.gitea.io/gitea/modules/web" |
|
|
|
"code.gitea.io/gitea/modules/web" |
|
|
|
"code.gitea.io/gitea/modules/web/middleware" |
|
|
|
"code.gitea.io/gitea/modules/web/middleware" |
|
|
|
"code.gitea.io/gitea/routers/utils" |
|
|
|
|
|
|
|
auth_service "code.gitea.io/gitea/services/auth" |
|
|
|
auth_service "code.gitea.io/gitea/services/auth" |
|
|
|
"code.gitea.io/gitea/services/auth/source/oauth2" |
|
|
|
"code.gitea.io/gitea/services/auth/source/oauth2" |
|
|
|
"code.gitea.io/gitea/services/context" |
|
|
|
"code.gitea.io/gitea/services/context" |
|
|
@ -368,7 +368,7 @@ func handleSignInFull(ctx *context.Context, u *user_model.User, remember, obeyRe |
|
|
|
return setting.AppSubURL + "/" |
|
|
|
return setting.AppSubURL + "/" |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if redirectTo := ctx.GetSiteCookie("redirect_to"); len(redirectTo) > 0 && !utils.IsExternalURL(redirectTo) { |
|
|
|
if redirectTo := ctx.GetSiteCookie("redirect_to"); redirectTo != "" && httplib.IsCurrentGiteaSiteURL(redirectTo) { |
|
|
|
middleware.DeleteRedirectToCookie(ctx.Resp) |
|
|
|
middleware.DeleteRedirectToCookie(ctx.Resp) |
|
|
|
if obeyRedirect { |
|
|
|
if obeyRedirect { |
|
|
|
ctx.RedirectToCurrentSite(redirectTo) |
|
|
|
ctx.RedirectToCurrentSite(redirectTo) |
|
|
|