-
Notifications
You must be signed in to change notification settings - Fork 8k
Imprement bug69791 - https://bugs.php.net/bug.php?id=69791 #2060
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This set of forbidden headers will most certainly break existing libraries. See e.g. here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a typo in the word 'string' here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@aboks Thank you!!
|
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