[IAM] Prepend AppSubURL to redirectURI before validating it (#103475)
This commit is contained in:
@@ -284,7 +284,7 @@ func handleLogin(r *http.Request, w http.ResponseWriter, cfg *setting.Cfg, ident
|
||||
scopedRedirectToCookie, err := r.Cookie(redirectToCookieName)
|
||||
if err == nil {
|
||||
redirectTo, _ := url.QueryUnescape(scopedRedirectToCookie.Value)
|
||||
if redirectTo != "" && validator(redirectTo) == nil {
|
||||
if redirectTo != "" && validator(cfg.AppSubURL+redirectTo) == nil {
|
||||
redirectURL = cfg.AppSubURL + redirectTo
|
||||
}
|
||||
cookies.DeleteCookie(w, redirectToCookieName, cookieOptions(cfg))
|
||||
|
||||
Reference in New Issue
Block a user