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
addr-spec = local-part "@" domain
local-part = dot-atom / quoted-string / obs-local-part
dot-atom = [CFWS] dot-atom-text [CFWS]
dot-atom-text = 1*atext *("." 1*atext)
atext = (Defined set of printable US-ASCII characters not including specials, see section 3.2.3)
So as I'm reading it the local-part is a single dot-atom-text (optionally with comments and folding whitespace around it but not inside it), dot-atom-text is a run of (atext or dot), and atext can only contain a defined set of printable ASCII characters.
Similarly, domain-literal doesn't seem to allow Unicode inside it either.
What did you see instead?
An invalid email address was parsed as valid.
The text was updated successfully, but these errors were encountered:
I do get that the domain you specify is (probably?) not allowed to be registered due to the unicode whitespace character (exaµple.com would be totally valid); but I don't think this is the right level of abstraction for the mail package to care about.
Yikes, so email addresses can now have whitespace in? Boy do I have opinions about that. Still, behavior is as per RFCs, so sorry for the bogus bug report.
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?Fedora release 37 (Thirty Seven)
What did you do?
https://go.dev/play/p/SWpZqP2Xxed
What did you expect to see?
An error.
Per RFC5322:
So as I'm reading it the local-part is a single dot-atom-text (optionally with comments and folding whitespace around it but not inside it), dot-atom-text is a run of (atext or dot), and atext can only contain a defined set of printable ASCII characters.
Similarly, domain-literal doesn't seem to allow Unicode inside it either.
What did you see instead?
An invalid email address was parsed as valid.
The text was updated successfully, but these errors were encountered: