2 ms·
Seems like someone wanted to use the standards compliant functionality for validating e-mails: I made a PR here : https://gitea.com/go-chi/binding/pulls/12 w
by KronisLV 4y ago
Seems like someone wanted to use the standards compliant functionality for validating e-mails:
I made a PR here : https://gitea.com/go-chi/binding/pulls/12 which uses the stdlib net/mail (which is rfc5322 compliant) for validation
But it was closed, because Gitea does not want to support with certain Unicode characters:
Closed as it allows utf-8
Isn't the proper solution there to just add an additional validation afterwards, AFTER using the standard functionality, something like:
if _, err := otherUtil.DisallowUnicode(fmt.Sprintf("%v", fieldValue)); err != nil {
...
}
Why close the pull request outright instead of just requesting that an additional validation against a set of disallowed characters be implemented?
Of course, I get the feeling that the developers just don't want to support "odd" e-mail addresses, because it doesn't affect them personally. They might be using just firstname.lastname@provider.com, or somenickname@provider.com, instead of using tags (+), slashes or other such symbols. Ergo, they might not care, at least when there are other issues that need to be solved and worked on - this gets de-prioritized.
- jeltz 4y agoAgreed, I really do not get why this PR was merged. It seems pretty obvious to me that the proper solution is to add a check for disallowed Unicode characters.