From: Art Cancro Date: Sat, 9 Sep 2023 00:51:54 +0000 (-0400) Subject: validate_recipients(): don't send mail to user 0 X-Git-Tag: v994~5 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=a39caf2fdda97bcb7b7078abf1befca9dc3a2e20 validate_recipients(): don't send mail to user 0 --- diff --git a/citadel/server/internet_addressing.c b/citadel/server/internet_addressing.c index 4108b41f1..05a0e900a 100644 --- a/citadel/server/internet_addressing.c +++ b/citadel/server/internet_addressing.c @@ -429,7 +429,8 @@ struct recptypes *validate_recipients(char *supplied_recipients, const char *Rem } // This handles the most common case, which is mail to a user's inbox. - else if (CtdlGetUser(&tempUS, this_recp) == 0) { + // (the next line depends on left-to-right evaluation) + else if ((CtdlGetUser(&tempUS, this_recp) == 0) && (tempUS.usernum > 0)) { ++ret->num_local; strcpy(this_recp, tempUS.fullname); if (!IsEmptyStr(ret->recp_local)) {