-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Mime] Fixed Mime\Message::ensureValidity()
when a required header is set, but has an empty body
#57065
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
[Mime] Fixed Mime\Message::ensureValidity()
when a required header is set, but has an empty body
#57065
Conversation
Hey! To help keep things organized, we don't allow "Draft" pull requests. Could you please click the "ready for review" button or close this PR and open a new one when you are done? Note that a pull request does not have to be "perfect" or "ready for merge" when you first open it. We just want it to be ready for a first review. Cheers! Carsonbot |
…idity()` when a required header is set with an empty body)
Hey! I see that this is your first PR. That is great! Welcome! Symfony has a contribution guide which I suggest you to read. In short:
Review the GitHub status checks of your pull request and try to solve the reported issues. If some tests are failing, try to see if they are failing because of this change. When two Symfony core team members approve this change, it will be merged and you will become an official Symfony contributor! I am going to sit back now and wait for the reviews. Cheers! Carsonbot |
@OskarStark PR feedback has been applied |
Mime\Message::ensureValidity()
when a required header is set, but has an empty bodyMime\Message::ensureValidity()
when a required header is set, but has an empty body
Don't we have the same issue in 5.4? |
…is set, but has an empty body
864b170
to
dc91a09
Compare
Thank you @rhertogh. |
we need to rework the fix a bit for PHP 7 for Symfony 5.4 (see #57228) |
According to RFC 5322 - Destination Address Fields "... Each destination field may have one or more addresses ...".
Currently
Message::ensureValidity()
only checks the presence of the required fields in headers which considers the message valid if the field is present but has no body. This PR adds empty checks for the required fields so that an exception will be raised when those fields are all empty.