diff options
author | Harrison Healey <harrisonmhealey@gmail.com> | 2017-06-28 07:56:29 -0400 |
---|---|---|
committer | Joram Wilander <jwawilander@gmail.com> | 2017-06-28 07:56:29 -0400 |
commit | c66799a83943af0ae03b17b657936e5327c55550 (patch) | |
tree | ca1bf150190fa95f84d010a854937817a03f6129 /app/team.go | |
parent | 4484c82b1becc2fe5ab7b6842b3419b16c523445 (diff) | |
download | chat-c66799a83943af0ae03b17b657936e5327c55550.tar.gz chat-c66799a83943af0ae03b17b657936e5327c55550.tar.bz2 chat-c66799a83943af0ae03b17b657936e5327c55550.zip |
Fixed error information being obscured when joining teams with API v4 (#6751)
Diffstat (limited to 'app/team.go')
-rw-r--r-- | app/team.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/team.go b/app/team.go index 0bed7e9a3..94523f8b5 100644 --- a/app/team.go +++ b/app/team.go @@ -199,12 +199,12 @@ func AddUserToTeamByHash(userId string, hash string, data string) (*model.Team, props := model.MapFromJson(strings.NewReader(data)) if hash != utils.HashSha256(fmt.Sprintf("%v:%v", data, utils.Cfg.EmailSettings.InviteSalt)) { - return nil, model.NewLocAppError("JoinUserToTeamByHash", "api.user.create_user.signup_link_invalid.app_error", nil, "") + return nil, model.NewAppError("JoinUserToTeamByHash", "api.user.create_user.signup_link_invalid.app_error", nil, "", http.StatusBadRequest) } t, timeErr := strconv.ParseInt(props["time"], 10, 64) if timeErr != nil || model.GetMillis()-t > 1000*60*60*48 { // 48 hours - return nil, model.NewLocAppError("JoinUserToTeamByHash", "api.user.create_user.signup_link_expired.app_error", nil, "") + return nil, model.NewAppError("JoinUserToTeamByHash", "api.user.create_user.signup_link_expired.app_error", nil, "", http.StatusBadRequest) } tchan := Srv.Store.Team().Get(props["id"]) |