modules/context/auth.go: fix redirect loop (#5965)

Closes #5815
This commit is contained in:
xdch47 2019-02-17 06:44:25 +01:00 committed by Lunny Xiao
parent 0b72c00fad
commit 5e7dee0db5
1 changed files with 1 additions and 1 deletions

View File

@ -42,7 +42,7 @@ func Toggle(options *ToggleOptions) macaron.Handler {
// prevent infinite redirection
// also make sure that the form cannot be accessed by
// users who don't need this
if ctx.Req.URL.Path == setting.AppSubURL+"/user/settings/change_password" {
if ctx.Req.URL.Path == "/user/settings/change_password" {
if !ctx.User.MustChangePassword {
ctx.Redirect(setting.AppSubURL + "/")
}