You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
bug symfony#57065 [Mime] Fixed Mime\Message::ensureValidity() when a required header is set, but has an empty body (rhertogh)
This PR was submitted for the 6.4 branch but it was squashed and merged into the 5.4 branch instead.
Discussion
----------
[Mime] Fixed `Mime\Message::ensureValidity()` when a required header is set, but has an empty body
| Q | A
| ------------- | ---
| Branch? | 6.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Issues | -
| License | MIT
According to [RFC 5322 - Destination Address Fields](https://datatracker.ietf.org/doc/html/rfc5322#section-3.6.3
) "... 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.
Commits
-------
dc91a09 [Mime] Fixed `Mime\Message::ensureValidity()` when a required header is set, but has an empty body
0 commit comments