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] Relaxing in-reply-to header validation #44732
Conversation
would be great to add a test to prevent regressions |
Hm, since the header type is passed as string... $header = new UnstructuredHeader('Subject', 'Test'); ...how can a regression be tested? |
@ThomasLandauer create an Email with a |
OK, thanks - like this? |
src/Symfony/Component/Mime/Tests/Header/UnstructuredHeaderTest.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/Mime/Tests/Header/UnstructuredHeaderTest.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/Mime/Tests/Header/UnstructuredHeaderTest.php
Outdated
Show resolved
Hide resolved
@nicolas-grekas @fabpot based on the issue being solved, I suggest we consider this as a bugfix. |
Works for me |
Thank you @ThomasLandauer. |
@nicolas-grekas Isn't this a BC break? The userland code has to be changed when updating from 5.4.1 to 5.4.2 (use the text header and add the brackets yourself). Before: $headers->addIdHeader('References', $messageIds);
$headers->addIdHeader('In-Reply-To', $messageId); After: $headers->addTextHeader('References', '<' . implode('> <', $messageIds) . '>');
$headers->addTextHeader('In-Reply-To', '<' . $messageId. '>'); |
Please open issues if you want further discussion. |
Yeah, you're right, this might be a BC break - sorry about that! |
Yes, you can use the more generic |
@nicolas-grekas
UnstructuredHeader
?IdentificationHeaderTest
are irrelevant now (but still pass) - should I remove them? And create some new test cases inUnstructuredHeaderTest
? Or rely on every aspect being tested with other headers there, and don't add anything?