MM-64926: Membership sync sends sensitive data to remote (#33560) (#33577)

Automatic Merge
Этот коммит содержится в:
Mattermost Build
2025-07-29 10:33:59 +03:00
коммит произвёл GitHub
родитель ce75debaca
Коммит 95eaf401af
2 изменённых файлов: 7 добавлений и 1 удалений

Просмотреть файл

@@ -48,6 +48,12 @@ func sanitizeUserForSync(user *model.User) *model.User {
return user
}
func sanitizeUserForSyncSafe(user *model.User) *model.User {
// Create a copy to avoid modifying the original user object
userCopy := *user
return sanitizeUserForSync(&userCopy)
}
const MungUsernameSeparator = "-"
// mungUsername creates a new username by combining username and remote cluster name, plus