From a39caf2fdda97bcb7b7078abf1befca9dc3a2e20 Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Fri, 8 Sep 2023 20:51:54 -0400 Subject: [PATCH] validate_recipients(): don't send mail to user 0 --- citadel/server/internet_addressing.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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)) { -- 2.30.2