From c66799a83943af0ae03b17b657936e5327c55550 Mon Sep 17 00:00:00 2001 From: Harrison Healey Date: Wed, 28 Jun 2017 07:56:29 -0400 Subject: Fixed error information being obscured when joining teams with API v4 (#6751) --- app/team.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app') 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"]) -- cgit v1.2.3-1-g7c22