[release-11.5.4] [IAM] Prepend AppSubURL to redirectURI before validating it (#103771)

[IAM] Prepend AppSubURL to redirectURI before validating it (#103475)

(cherry picked from commit 5053aa576d)
This commit is contained in:
xavi
2025-04-11 14:00:33 +02:00
committed by GitHub
parent 9d02fa97b1
commit 684fbc089e
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -283,7 +283,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))