MM-53147 Support for embedding Mattermost in an MSTeams iframe (#23776)
* add teams to allowed frame-ancestors * fix unit tests * set SameSite attribute for session cookie * further restrict ancestors * skip landing page if in iframe * Only set cookie SameSite=None if embedded in iframe * don't set MMEMBED cookie on landing page (check only) * fully parse MMEMBED cookie * add comment * more comments --------- Co-authored-by: Mattermost Build <build@mattermost.com>
Этот коммит содержится в:
@@ -323,6 +323,12 @@ func (a *App) AttachSessionCookies(c *request.Context, w http.ResponseWriter, r
|
||||
Secure: secure,
|
||||
}
|
||||
|
||||
if secure && utils.CheckEmbeddedCookie(r) {
|
||||
sessionCookie.SameSite = http.SameSiteNoneMode
|
||||
userCookie.SameSite = http.SameSiteNoneMode
|
||||
csrfCookie.SameSite = http.SameSiteNoneMode
|
||||
}
|
||||
|
||||
http.SetCookie(w, sessionCookie)
|
||||
http.SetCookie(w, userCookie)
|
||||
http.SetCookie(w, csrfCookie)
|
||||
|
||||
Ссылка в новой задаче
Block a user