Don't leak user ids in error messages (#916)

This commit is contained in:
Louis Ruch authored and GitHub committed 2021-02-05 13:17:13 -08:00
1 parent 9576c46a4b
commit ff1293b983
1 file changed
+1 -1
+1 -1
View File
@@ -651,7 +651,7 @@ func associateUserWithAccounts(ctx context.Context, repoKms *kms.Kms, reader db.
return errors.Wrap(err, op, errors.WithMsg(fmt.Sprintf("unable to lookup account %s", accountId)))
}
if acct.IamUserId != "" && acct.IamUserId != userId {
return errors.New(errors.InvalidParameter, op, fmt.Sprintf("%s account is associated with a user %s", accountId, acct.IamUserId))
return errors.New(errors.InvalidParameter, op, fmt.Sprintf("%s account is already associated with another user", accountId))
}
authAccounts = append(authAccounts, &acct)
}