Convert URLs to fully-qualified for HTTP redirects (#19020)
* Convert URLs to fully-qualified for HTTP redirects * forgot the tests
Этот коммит содержится в:
@@ -110,6 +110,7 @@ func completeSaml(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
redirectURL = val
|
||||
hasRedirectURL = val != ""
|
||||
}
|
||||
redirectURL = fullyQualifiedRedirectURL(c.GetSiteURLHeader(), redirectURL)
|
||||
|
||||
handleError := func(err *model.AppError) {
|
||||
if isMobile && hasRedirectURL {
|
||||
@@ -184,7 +185,6 @@ func completeSaml(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
})
|
||||
utils.RenderMobileAuthComplete(w, redirectURL)
|
||||
} else {
|
||||
redirectURL = c.GetSiteURLHeader() + redirectURL
|
||||
http.Redirect(w, r, redirectURL, http.StatusFound)
|
||||
}
|
||||
return
|
||||
|
||||
Ссылка в новой задаче
Block a user