Imprement bug69791 - https://bugs.php.net/bug.php?id=69791#2060
Imprement bug69791 - https://bugs.php.net/bug.php?id=69791#2060yohgaki wants to merge 15 commits intophp:masterfrom
Conversation
| /* https://tools.ietf.org/html/rfc2822#section-3.6 */ | ||
| switch(ZSTR_LEN(key)) { | ||
| case sizeof("orig-date")-1: | ||
| if (!strncasecmp("orig-date", ZSTR_VAL(key), ZSTR_LEN(key))) { |
There was a problem hiding this comment.
This set of forbidden headers will most certainly break existing libraries. See e.g. here.
There was a problem hiding this comment.
@lstrojny TO and SUBJECT headers can be used only once and mail()/mb_send_mail() sets these by "to" and "subject" parameters. mail()/mb_send_mail() users can only set "extra_headers" once and illegal header counts is illegal.
I'm not sure why it causes BC. Could you explain why?
NOTE: It does not care for MIME headers inside mail body at all, but only mail headers of SMTP.
There was a problem hiding this comment.
@yohgaki sorry, I misread the patch, all good 👍
ext/standard/php_mail.h
Outdated
| } \ | ||
| php_mail_build_headers_elems(&s, key, val); \ | ||
| } else { \ | ||
| php_error_docref(NULL, E_WARNING, "Extra header element '%s' cannot be other than stirng or array.", ZSTR_VAL(key)); \ |
There was a problem hiding this comment.
There is a typo in the word 'string' here.
|
merged commit 6e53050 Sorry bug # was wrong... Fixed in NEWS later |
Implement optional array extra mail headers.
https://bugs.php.net/bug.php?id=69791