Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[Mailer][Mime][TwigBridge][Validator] Allow egulias/email-validator 3.x#39685
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
derrabus commentedJan 2, 2021
| Q | A |
|---|---|
| Branch? | 4.4 |
| Bug fix? | yes |
| New feature? | no |
| Deprecations? | no |
| Tickets | Fix#39656 |
| License | MIT |
| Doc PR | N/A |
derrabus commentedJan 2, 2021
I need a little help with that test: symfony/src/Symfony/Component/Mime/Tests/Header/IdentificationHeaderTest.php Lines 109 to 118 in04c67e6
During the construction of @fabpot you are the author of that test: Do you recall what is tested here and have an idea how we can proceed with the changed behavior of |
composer.json Outdated
| "psr/http-client":"^1.0", | ||
| "psr/simple-cache":"^1.0", | ||
| "egulias/email-validator":"~1.2,>=1.2.8|~2.0", | ||
| "egulias/email-validator":"^1.2.8|^2|^3", |
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.
Shall I change bump to^2.1.10|^3 here to be consistent with the constraint in the components? I don't think that we're testing with v1 anywhere at the moment.
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.
Let's drop 1.2, no need to support 3 major versions anyway.
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.
Do we really want to drop support for it in a patch release?
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.
We should drop it in 5.x only.
Uh oh!
There was an error while loading.Please reload this page.
fabpot commentedJan 3, 2021
But these characters are valid (seehttps://tools.ietf.org/html/rfc2822#section-3.2.4). If looks like a wrong change in email validator. |
derrabus commentedJan 3, 2021
Indeed, when validating strictly according to the RFC, these characters should be allowed if I read the RFC correctly. Friendly ping to@egulias. |
egulias commentedJan 3, 2021 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Hello there, |
fabpot commentedJan 4, 2021
@egulias Thanks for the comment. The main "issue" here is that we are validating a message id/reference/reply to and for those, I'm not sure we should use RFC 1035. At least, that would be a BC break (which we can assume for good reasons). Is there a way to keep validating according to the original spec? |
egulias commentedJan 4, 2021
Hi@fabpot , To solve this two options come to my mind: a) is for Symfony to add a custom validator for it implementing the interface. b) is to make it the next feature to be added. I can work on my own here but it will take time; some help would be very much appreciated to speed it up. Happy to hear more possibilites. |
egulias commentedJan 17, 2021 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Hi@fabpot@derrabus , |
egulias commentedJan 30, 2021
Ok. So did a research on how the validator is being used in Symfony & Swiftmailer. My conclusion is as follows: This was possible in version <3 of the EmailValidator because of the interpretation done of the RFC. The solution for this, then, is to create a new validation for "message-id" and then addapt if (!self::$validator->isValid($this->address,newMessageIDValidation())) { @fabpot@xabbuh & others, please let me know if this would work for you. DetailsThe exception bubbles fromAddress in the Mime component, used from the Now, here's the thing. id-right
To note that domain syntaxis
And at the ends, specifies:
STD13 is RFC1035 |
egulias commentedFeb 21, 2021
Hi there! if (!self::$validator->isValid($this->address,newMessageIDValidation())) { |
f6f5404 tob37e598Comparederrabus commentedFeb 22, 2021
@egulias That's great news, thank you. Give me a ping as soon as we can test the new validator. I'll update this PR then. |
egulias commentedFeb 28, 2021
PR ready@derrabusegulias/EmailValidator#290 , will give it a week and merge next one. |
b37e598 to3ec6a8bComparederrabus commentedFeb 28, 2021
@egulias This PR now runs against your feature branch and the tests are green now. Apparently, your changes work for us. 🎉 |
egulias commentedMar 7, 2021
3ec6a8b to3beeadbComparederrabus commentedMar 7, 2021
Thank you, the PR is ready now. 🚀 |
fabpot commentedMar 7, 2021
Thank you@egulias! |
fabpot commentedMar 7, 2021
Thank you@derrabus. |
derrabus commentedMar 7, 2021
Thanks! I've merged the changes up to 5.x and resolved all the composer.json conflicts. |