From: Sara Golemon Date: Sat, 28 Dec 2002 19:32:45 +0000 (+0000) Subject: When scanning for cc: headers, make sure the header is JUST cc: and not bcc: or origi... X-Git-Tag: PHP_5_0_dev_before_13561_fix~583 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=072d5c2575fc622b83cc9ef4631371900505e47e;p=php When scanning for cc: headers, make sure the header is JUST cc: and not bcc: or original-cc: or cc: See Bugs # 21036 and # 20707 --- diff --git a/win32/sendmail.c b/win32/sendmail.c index 5a8c7276d3..3d4b95b386 100644 --- a/win32/sendmail.c +++ b/win32/sendmail.c @@ -435,7 +435,7 @@ int SendText(char *RPath, char *Subject, char *mailTo, char *mailCc, char *mailB efree(tempMailTo); } /* Send mail to all Cc rcpt's */ - else if (headers && (pos1 = strstr(headers_lc, "cc:"))) { + else if (headers && (pos1 = strstr(headers_lc, "cc:")) && ((pos1 == headers_lc) || !iscntrl(*(pos1-1)))) { /* Real offset is memaddress from the original headers + difference of * string found in the lowercase headrs + 3 characters to jump over * the cc: */