MFB: Fixed bug #48620 (X-PHP-Originating-Script assumes no trailing CRLF in

existing headers)
This commit is contained in:
Ilia Alshanetsky 2009-06-21 15:30:23 +00:00
parent 8990a91fd7
commit ca74bf9e44

View file

@ -235,7 +235,7 @@ PHPAPI int php_mail(char *to, char *subject, char *message, char *headers, char
php_basename(tmp, strlen(tmp), NULL, 0, &f, &f_len TSRMLS_CC);
if (headers != NULL) {
spprintf(&hdr, 0, "%s\r\nX-PHP-Originating-Script: %ld:%s\n", headers, php_getuid(), f);
spprintf(&hdr, 0, "X-PHP-Originating-Script: %ld:%s\r\n%s", php_getuid(), f, headers);
} else {
spprintf(&hdr, 0, "X-PHP-Originating-Script: %ld:%s\n", php_getuid(), f);
}