{"action":"created","issue":{"url":"https://api.github.com/repos/neos/flow-development-collection/issues/1227","repository_url":"https://api.github.com/repos/neos/flow-development-collection","labels_url":"https://api.github.com/repos/neos/flow-development-collection/issues/1227/labels{/name}","comments_url":"https://api.github.com/repos/neos/flow-development-collection/issues/1227/comments","events_url":"https://api.github.com/repos/neos/flow-development-collection/issues/1227/events","html_url":"https://github.com/neos/flow-development-collection/issues/1227","id":303029382,"number":1227,"title":"EmailAddressValidator does not work with IDN domains","user":{"login":"lorenzulrich","id":1816023,"avatar_url":"https://avatars0.githubusercontent.com/u/1816023?v=4","gravatar_id":"","url":"https://api.github.com/users/lorenzulrich","html_url":"https://github.com/lorenzulrich","followers_url":"https://api.github.com/users/lorenzulrich/followers","following_url":"https://api.github.com/users/lorenzulrich/following{/other_user}","gists_url":"https://api.github.com/users/lorenzulrich/gists{/gist_id}","starred_url":"https://api.github.com/users/lorenzulrich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lorenzulrich/subscriptions","organizations_url":"https://api.github.com/users/lorenzulrich/orgs","repos_url":"https://api.github.com/users/lorenzulrich/repos","events_url":"https://api.github.com/users/lorenzulrich/events{/privacy}","received_events_url":"https://api.github.com/users/lorenzulrich/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2018-03-07T09:47:32Z","updated_at":"2018-05-02T22:47:21Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"### Description\r\n\r\nAn e-mail address using an IDN domain name is not considered a valid e-mail address.\r\n\r\n### Steps to Reproduce\r\n\r\n1. Create a scenario using an EmailAddressValidator, e.g. an e-mail field with `Neos.Form`.\r\n2. Enter an e-mail address with an IDN domain, e.g. `test@neös.io`.\r\n3. Trigger validation\r\n\r\n#### Expected behavior\r\n\r\nThe e-mail address is valid.\r\n\r\n#### Actual behavior\r\n\r\nA validation error is thrown: `Please specify a valid email address.`\r\n\r\n### Affected Versions\r\n\r\nFlow: all versions\r\n\r\n### Background\r\n\r\nThe EmailAddressValidator is using `filter_var` as follows:\r\n\r\n```filter_var($emailAddress, FILTER_VALIDATE_EMAIL)```\r\n\r\nThis does not support IDN domain names. As of PHP 7.1, it seems to be possible to set a filter flag `FILTER_FLAG_EMAIL_UNICODE`, but this is not a short-term solution for Flow installations using PHP < 7.1."},"comment":{"url":"https://api.github.com/repos/neos/flow-development-collection/issues/comments/386144830","html_url":"https://github.com/neos/flow-development-collection/issues/1227#issuecomment-386144830","issue_url":"https://api.github.com/repos/neos/flow-development-collection/issues/1227","id":386144830,"user":{"login":"albe","id":4259532,"avatar_url":"https://avatars1.githubusercontent.com/u/4259532?v=4","gravatar_id":"","url":"https://api.github.com/users/albe","html_url":"https://github.com/albe","followers_url":"https://api.github.com/users/albe/followers","following_url":"https://api.github.com/users/albe/following{/other_user}","gists_url":"https://api.github.com/users/albe/gists{/gist_id}","starred_url":"https://api.github.com/users/albe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/albe/subscriptions","organizations_url":"https://api.github.com/users/albe/orgs","repos_url":"https://api.github.com/users/albe/repos","events_url":"https://api.github.com/users/albe/events{/privacy}","received_events_url":"https://api.github.com/users/albe/received_events","type":"User","site_admin":false},"created_at":"2018-05-02T22:47:21Z","updated_at":"2018-05-02T22:47:21Z","author_association":"MEMBER","body":"I would prefer to fix this for Flow 5.x+ with the `FILTER_FLAG_EMAIL_UNICODE` flag and then see what can be done about lower versions. Unfortunately, a first quick test with that flag showed, that it will not work with IDN domains, just with unicode characters in the address part.\r\n\r\nThe issue with `idn_to_ascii` is, that it requires the php_intl extension to be enabled, which it isn't by default in all installations. So given it's ok to add this requirement, I'd probably go with just adding that to the validator. However I'm not sure it is really acceptable to expect an additional extension in old versions to have email validation still work, since that would be breaking. So it would need an check for the function to be available and then, that would suddenly become a switch in behaviour depending on the enabled extensions. I don't like such hard to follow behaviour.\r\n\r\nSo with all that in mind, my suggestion would be to add the `idn_to_ascii` feature to the upcoming 5.1 release earliest."}}
{"actor":{"display_login":"albe"}}