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>
Этот коммит содержится в:
@@ -2241,6 +2241,10 @@ func attachDeviceId(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
Secure: secure,
|
||||
}
|
||||
|
||||
if secure && utils.CheckEmbeddedCookie(r) {
|
||||
sessionCookie.SameSite = http.SameSiteNoneMode
|
||||
}
|
||||
|
||||
http.SetCookie(w, sessionCookie)
|
||||
|
||||
if err := c.App.AttachDeviceId(c.AppContext.Session().Id, deviceId, c.AppContext.Session().ExpiresAt); err != nil {
|
||||
|
||||
Ссылка в новой задаче
Block a user