|
|
@ -95,7 +95,6 @@ func Login(c *context.Context) { |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
redirectTo, _ = url.QueryUnescape(c.GetCookie("redirect_to")) |
|
|
|
redirectTo, _ = url.QueryUnescape(c.GetCookie("redirect_to")) |
|
|
|
} |
|
|
|
} |
|
|
|
c.SetCookie("redirect_to", "", -1, setting.AppSubURL) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if isSucceed { |
|
|
|
if isSucceed { |
|
|
|
if isValidRedirect(redirectTo) { |
|
|
|
if isValidRedirect(redirectTo) { |
|
|
@ -103,6 +102,7 @@ func Login(c *context.Context) { |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
c.Redirect(setting.AppSubURL + "/") |
|
|
|
c.Redirect(setting.AppSubURL + "/") |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
c.SetCookie("redirect_to", "", -1, setting.AppSubURL) |
|
|
|
return |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|