diff options
Diffstat (limited to 'app/team.go')
-rw-r--r-- | app/team.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/app/team.go b/app/team.go index 5a81bd220..dc10760f8 100644 --- a/app/team.go +++ b/app/team.go @@ -238,6 +238,11 @@ func (a *App) AddUserToTeamByHash(userId string, hash string, data string) (*mod team = result.Data.(*model.Team) } + // verify that the team's invite id hasn't been changed since the invite was sent + if team.InviteId != props["invite_id"] { + return nil, model.NewAppError("JoinUserToTeamByHash", "api.user.create_user.signup_link_mismatched_invite_id.app_error", nil, "", http.StatusBadRequest) + } + var user *model.User if result := <-uchan; result.Err != nil { return nil, result.Err |